Layout issue on MACOS



  • Hi,

    I implement a cross platform application (windows/macos)
    In some UI the layout is incorrect (widget not aligned or widget overlap another)
    I changed the layout and nothing change.
    My issue is visible in editor.
    How can I solve it ?
    thanks.

    sorry for my bad english.


  • Moderators

    @Roy44
    you need to give a little more input when you expect help.
    At least some pieces of code...



  • Thats the difference between Windows (top) and MacOS (bottom)
    0_1476211725452_compare.png

    from this ui file :

    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
     <class>MdLayerCombo</class>
     <widget class="QWidget" name="MdLayerCombo">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>250</width>
        <height>20</height>
       </rect>
      </property>
      <property name="maximumSize">
       <size>
        <width>250</width>
        <height>20</height>
       </size>
      </property>
      <property name="windowTitle">
       <string>Form</string>
      </property>
      <layout class="QHBoxLayout" name="horizontalLayout">
       <property name="spacing">
        <number>1</number>
       </property>
       <property name="leftMargin">
        <number>0</number>
       </property>
       <property name="topMargin">
        <number>0</number>
       </property>
       <property name="rightMargin">
        <number>0</number>
       </property>
       <property name="bottomMargin">
        <number>0</number>
       </property>
       <item>
        <widget class="QTableWidget" name="tbWdg">
         <property name="maximumSize">
          <size>
           <width>16665</width>
           <height>20</height>
          </size>
         </property>
         <property name="verticalScrollBarPolicy">
          <enum>Qt::ScrollBarAlwaysOff</enum>
         </property>
         <property name="horizontalScrollBarPolicy">
          <enum>Qt::ScrollBarAlwaysOff</enum>
         </property>
         <property name="rowCount">
          <number>1</number>
         </property>
         <property name="columnCount">
          <number>7</number>
         </property>
         <attribute name="horizontalHeaderVisible">
          <bool>false</bool>
         </attribute>
         <attribute name="horizontalHeaderDefaultSectionSize">
          <number>20</number>
         </attribute>
         <attribute name="horizontalHeaderHighlightSections">
          <bool>true</bool>
         </attribute>
         <attribute name="horizontalHeaderStretchLastSection">
          <bool>true</bool>
         </attribute>
         <attribute name="verticalHeaderVisible">
          <bool>false</bool>
         </attribute>
         <attribute name="verticalHeaderDefaultSectionSize">
          <number>20</number>
         </attribute>
         <attribute name="verticalHeaderMinimumSectionSize">
          <number>20</number>
         </attribute>
         <row>
          <property name="text">
           <string>Nouvelle ligne</string>
          </property>
         </row>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <column>
          <property name="text">
           <string>Nouvelle colonne</string>
          </property>
         </column>
         <item row="0" column="0">
          <property name="text">
           <string/>
          </property>
          <property name="icon">
           <iconset resource="../resources.qrc">
            <normaloff>:/resources/res/res/lightOn.png</normaloff>:/resources/res/res/lightOn.png</iconset>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable</set>
          </property>
         </item>
         <item row="0" column="1">
          <property name="text">
           <string/>
          </property>
          <property name="icon">
           <iconset resource="../resources.qrc">
            <normaloff>:/resources/res/res/sun.png</normaloff>:/resources/res/res/sun.png</iconset>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
          </property>
         </item>
         <item row="0" column="2">
          <property name="text">
           <string/>
          </property>
          <property name="icon">
           <iconset resource="../resources.qrc">
            <normaloff>:/resources/res/res/paperSun.png</normaloff>:/resources/res/res/paperSun.png</iconset>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
          </property>
         </item>
         <item row="0" column="3">
          <property name="text">
           <string/>
          </property>
          <property name="icon">
           <iconset resource="../resources.qrc">
            <normaloff>:/resources/res/res/unlocked.png</normaloff>:/resources/res/res/unlocked.png</iconset>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
          </property>
         </item>
         <item row="0" column="4">
          <property name="text">
           <string/>
          </property>
          <property name="icon">
           <iconset resource="../resources.qrc">
            <normaloff>:/resources/res/res/print.png</normaloff>:/resources/res/res/print.png</iconset>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
          </property>
         </item>
         <item row="0" column="5">
          <property name="text">
           <string/>
          </property>
          <property name="icon">
           <iconset resource="../../MdPropertyEdit/resources.qrc">
            <normaloff>:/resources/res/res/layer.png</normaloff>:/resources/res/res/layer.png</iconset>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
          </property>
         </item>
         <item row="0" column="6">
          <property name="text">
           <string>CurrentLayer</string>
          </property>
          <property name="font">
           <font>
            <weight>75</weight>
            <bold>true</bold>
           </font>
          </property>
          <property name="background">
           <brush brushstyle="NoBrush">
            <color alpha="255">
             <red>0</red>
             <green>0</green>
             <blue>0</blue>
            </color>
           </brush>
          </property>
          <property name="foreground">
           <brush brushstyle="NoBrush">
            <color alpha="255">
             <red>0</red>
             <green>0</green>
             <blue>255</blue>
            </color>
           </brush>
          </property>
          <property name="flags">
           <set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
          </property>
         </item>
        </widget>
       </item>
       <item>
        <widget class="QPushButton" name="pBtnDrop">
         <property name="minimumSize">
          <size>
           <width>20</width>
           <height>20</height>
          </size>
         </property>
         <property name="maximumSize">
          <size>
           <width>20</width>
           <height>20</height>
          </size>
         </property>
         <property name="text">
          <string/>
         </property>
         <property name="icon">
          <iconset resource="../resources.qrc">
           <normaloff>:/resources/res/res/dropDown.png</normaloff>:/resources/res/res/dropDown.png</iconset>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
     <resources>
      <include location="../../MdPropertyEdit/resources.qrc"/>
      <include location="../resources.qrc"/>
     </resources>
     <connections/>
    </ui>
    
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.