Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. (Solved) Layouts - looks great in windows and linux, horrible in MAC, and other issues

(Solved) Layouts - looks great in windows and linux, horrible in MAC, and other issues

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rootshellR Offline
    rootshellR Offline
    rootshell
    wrote on last edited by
    #1

    Working on migrating an application to Mac as I just got a mac book pro (love it), and ran into a few issues...

    1 - Library created in Qt is "not loaded", as another post suggested I added "DYLD_LIBRARY_PATH" to the project settings and it loads it....is there a better / easier way? I move this code between windows, linux and mac daily, it is a bit of a chore to add it back into the project each time I get on the mac.

    2 -The layouts looks good on windows and linux, but on mac they are horrible....the text boxes are centered and only about 20 pixels wide....the layout is set to expend with the window, does not occur on mac.

    Thoughts?

    Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

    Languages: C++, C#, VB, Python, Java

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt are you using ? What version of OS X are you running ?

      1. DYLD_LIBRARY_PATH is fine to use. You can set it in Qt Creator and be done with it.

      You can also set the rpath when building your library on OS X

      1. Without any code, it's only crystal ball debugging so no real way to help you.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • rootshellR Offline
        rootshellR Offline
        rootshell
        wrote on last edited by
        #3

        Thanks for the response,

        Qt = 5.3
        Qt Creator = 3.2.0 (Open Source)
        OSX =10.9.4

        I did not write any GUI code, simply created a new window and drag / dropped components, selected them and choose a layout, but, here is the code from one of the simple windows.

        It seems like the "grid layout" is whats most impacted, will play around with it but any help is appreciated :)

        @

        <layout class="QVBoxLayout" name="verticalLayout">
        <item>
        <widget class="QLabel" name="label">
        <property name="text">
        <string>About this program</string>
        </property>
        </widget>
        </item>
        <item>
        <layout class="QFormLayout" name="formLayout">
        <item row="0" column="0">
        <widget class="QLabel" name="label_2">
        <property name="text">
        <string>Author:</string>
        </property>
        </widget>
        </item>
        <item row="0" column="1">
        <widget class="QLabel" name="label_3">
        <property name="text">
        <string>Bryan Cairns</string>
        </property>
        </widget>
        </item>
        <item row="1" column="0">
        <widget class="QLabel" name="label_4">
        <property name="text">
        <string>Email:</string>
        </property>
        </widget>
        </item>
        <item row="1" column="1">
        <widget class="QLabel" name="label_5">
        <property name="text">
        <string><html><head/><body><p>support@pluginbot.net</p></body></html></string>
        </property>
        </widget>
        </item>
        <item row="2" column="0">
        <widget class="QLabel" name="label_6">
        <property name="text">
        <string>URL:</string>
        </property>
        </widget>
        </item>
        <item row="2" column="1">
        <widget class="QLabel" name="label_7">
        <property name="text">
        <string><html><head/><body><p>http://www.pluginbot.net</p></body></html></string>
        </property>
        </widget>
        </item>
        <item row="3" column="0">
        <widget class="QLabel" name="label_9">
        <property name="text">
        <string>Version:</string>
        </property>
        </widget>
        </item>

        @

        Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

        Languages: C++, C#, VB, Python, Java

        1 Reply Last reply
        0
        • rootshellR Offline
          rootshellR Offline
          rootshell
          wrote on last edited by
          #4

          update: on a grid layout:
          set "LayoutFieldGrowth" to "ExpandingFieldsGrow"

          Seems to have fixed the issue :)

          Certifications: CISSP, MCITP, MCSE, MCSA, BA, AA, AG, CST, CNST, Linux+, Security+, Server+, Network+, A+, iNet+

          Languages: C++, C#, VB, Python, Java

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved