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. Problem with Groupbox in ScrollArea

Problem with Groupbox in ScrollArea

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 308 Views 2 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    I've got a scrollable area that contains a number of Group Boxes.

    When I reduce the window size the vertical scroll bar appears and I can scroll through the display. That's fine but the first frame in the top group box shrinks so that the text doesn't display correctly on some Linux systems - Ubtuntu 24.04.03 (Noble Numbat) has this problem, whereas Lubuntu and Linux Mint work OK. Windows and macOS are also OK

    8f771f58-7c99-4364-9d40-53e7272d31ea-image.png

    I don't think this is a mistake in my UI file (I've been looking for an error for quite a while now and have failed to spot one). That first frame is defined with vertical size policy of fixed but yet it gets smaller vertically?

    Here's the entire ui file:

    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
     <class>DSS::ExplorerBar</class>
     <widget class="QDockWidget" name="DSS::ExplorerBar">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>310</width>
        <height>1052</height>
       </rect>
      </property>
      <property name="sizePolicy">
       <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="minimumSize">
       <size>
        <width>310</width>
        <height>454</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
        <width>310</width>
        <height>524287</height>
       </size>
      </property>
      <property name="styleSheet">
       <string/>
      </property>
      <property name="features">
       <set>QDockWidget::DockWidgetFeature::DockWidgetFloatable|QDockWidget::DockWidgetFeature::DockWidgetMovable</set>
      </property>
      <property name="allowedAreas">
       <set>Qt::DockWidgetArea::LeftDockWidgetArea</set>
      </property>
      <property name="windowTitle">
       <string notr="true">DeepSkyStacker</string>
      </property>
      <widget class="QWidget" name="dockWidgetContents">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="minimumSize">
        <size>
         <width>260</width>
         <height>430</height>
        </size>
       </property>
       <property name="maximumSize">
        <size>
         <width>350</width>
         <height>16777215</height>
        </size>
       </property>
       <property name="windowTitle">
        <string/>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout" stretch="0">
        <property name="spacing">
         <number>24</number>
        </property>
        <property name="leftMargin">
         <number>5</number>
        </property>
        <property name="topMargin">
         <number>5</number>
        </property>
        <property name="rightMargin">
         <number>5</number>
        </property>
        <property name="bottomMargin">
         <number>5</number>
        </property>
        <item>
         <widget class="QScrollArea" name="explorerScrollArea">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
          <property name="widgetResizable">
           <bool>true</bool>
          </property>
          <widget class="QWidget" name="scrollAreaWidgetContents">
           <property name="geometry">
            <rect>
             <x>0</x>
             <y>0</y>
             <width>298</width>
             <height>859</height>
            </rect>
           </property>
           <property name="sizePolicy">
            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
           <property name="minimumSize">
            <size>
             <width>230</width>
             <height>814</height>
            </size>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_2">
            <item>
             <widget class="QGroupBox" name="registerAndStack">
              <property name="sizePolicy">
               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
              <property name="minimumSize">
               <size>
                <width>0</width>
                <height>0</height>
               </size>
              </property>
              <property name="styleSheet">
               <string notr="true"/>
              </property>
              <property name="title">
               <string comment="IDC_STACKING_TITLE">Registering and Stacking</string>
              </property>
              <layout class="QVBoxLayout" name="verticalLayout_8" stretch="7,3,4">
               <property name="spacing">
                <number>5</number>
               </property>
               <property name="leftMargin">
                <number>5</number>
               </property>
               <property name="topMargin">
                <number>5</number>
               </property>
               <property name="rightMargin">
                <number>5</number>
               </property>
               <property name="bottomMargin">
                <number>5</number>
               </property>
               <item>
                <widget class="QFrame" name="frame_1">
                 <property name="sizePolicy">
                  <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                   <horstretch>0</horstretch>
                   <verstretch>0</verstretch>
                  </sizepolicy>
                 </property>
                 <property name="frameShape">
                  <enum>QFrame::Shape::StyledPanel</enum>
                 </property>
                 <layout class="QVBoxLayout" name="verticalLayout_9">
                  <property name="spacing">
                   <number>4</number>
                  </property>
                  <property name="leftMargin">
                   <number>5</number>
                  </property>
                  <property name="topMargin">
                   <number>5</number>
                  </property>
                  <property name="rightMargin">
                   <number>5</number>
                  </property>
                  <property name="bottomMargin">
                   <number>5</number>
                  </property>
                  <item>
                   <widget class="QLabel" name="openLights">
                    <property name="styleSheet">
                     <string notr="true"/>
                    </property>
                    <property name="text">
                     <string comment="IDC_STACKING_OPENFILES">Open picture files...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="openDarks">
                    <property name="styleSheet">
                     <string notr="true">margin-left: 30</string>
                    </property>
                    <property name="text">
                     <string comment="IDC_STACKING_OPENDARKS">dark files...</string>
                    </property>
                    <property name="margin">
                     <number>0</number>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="openFlats">
                    <property name="styleSheet">
                     <string notr="true">margin-left: 30</string>
                    </property>
                    <property name="text">
                     <string comment="IDC_STACKING_OPENFLATS">flat files...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="openDarkFlats">
                    <property name="styleSheet">
                     <string notr="true">margin-left: 30</string>
                    </property>
                    <property name="text">
                     <string comment="IDC_STACKING_OPENDARKFLATS">dark flat files...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="openBias">
                    <property name="styleSheet">
                     <string notr="true">margin-left: 30</string>
                    </property>
                    <property name="text">
                     <string comment="IDC_STACKING_OPENOFFSETS">offset/bias files...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <spacer name="verticalSpacer_3">
                    <property name="orientation">
                     <enum>Qt::Orientation::Vertical</enum>
                    </property>
                    <property name="sizeType">
                     <enum>QSizePolicy::Policy::Fixed</enum>
                    </property>
                    <property name="sizeHint" stdset="0">
                     <size>
                      <width>20</width>
                      <height>5</height>
                     </size>
                    </property>
                   </spacer>
                  </item>
                  <item>
                   <widget class="QLabel" name="openFilelist">
                    <property name="text">
                     <string comment="IDC_STACKING_LOADLIST">Open a File List...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="saveFilelist">
                    <property name="text">
                     <string comment="IDC_STACKING_SAVELIST">Save the File List...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <spacer name="verticalSpacer_4">
                    <property name="orientation">
                     <enum>Qt::Orientation::Vertical</enum>
                    </property>
                    <property name="sizeType">
                     <enum>QSizePolicy::Policy::Fixed</enum>
                    </property>
                    <property name="sizeHint" stdset="0">
                     <size>
                      <width>20</width>
                      <height>5</height>
                     </size>
                    </property>
                   </spacer>
                  </item>
                  <item>
                   <widget class="QLabel" name="clearList">
                    <property name="text">
                     <string comment="IDC_STACKING_CLEARLIST">Clear List</string>
                    </property>
                   </widget>
                  </item>
                 </layout>
                </widget>
               </item>
               <item>
                <widget class="QFrame" name="frame_2">
                 <property name="sizePolicy">
                  <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                   <horstretch>0</horstretch>
                   <verstretch>0</verstretch>
                  </sizepolicy>
                 </property>
                 <property name="frameShape">
                  <enum>QFrame::Shape::StyledPanel</enum>
                 </property>
                 <layout class="QVBoxLayout" name="verticalLayout_10">
                  <property name="spacing">
                   <number>4</number>
                  </property>
                  <property name="leftMargin">
                   <number>5</number>
                  </property>
                  <property name="topMargin">
                   <number>5</number>
                  </property>
                  <property name="rightMargin">
                   <number>5</number>
                  </property>
                  <property name="bottomMargin">
                   <number>5</number>
                  </property>
                  <item>
                   <widget class="QLabel" name="checkAll">
                    <property name="text">
                     <string comment="IDC_STACKING_CHECKALL">Check all</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="checkAbove">
                    <property name="text">
                     <string comment="IDC_STACKING_CHECKABOVE">Check above a threshold...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="unCheckAll">
                    <property name="text">
                     <string comment="IDC_STACKING_UNCHECKALL">Uncheck all</string>
                    </property>
                   </widget>
                  </item>
                 </layout>
                </widget>
               </item>
               <item>
                <widget class="QFrame" name="frame_3">
                 <property name="sizePolicy">
                  <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                   <horstretch>0</horstretch>
                   <verstretch>0</verstretch>
                  </sizepolicy>
                 </property>
                 <property name="frameShape">
                  <enum>QFrame::Shape::StyledPanel</enum>
                 </property>
                 <layout class="QVBoxLayout" name="verticalLayout_11">
                  <property name="spacing">
                   <number>4</number>
                  </property>
                  <property name="leftMargin">
                   <number>5</number>
                  </property>
                  <property name="topMargin">
                   <number>5</number>
                  </property>
                  <property name="rightMargin">
                   <number>5</number>
                  </property>
                  <property name="bottomMargin">
                   <number>5</number>
                  </property>
                  <item>
                   <widget class="QLabel" name="registerChecked">
                    <property name="text">
                     <string comment="IDC_REGISTERING_REGISTERCHECKED">Register checked pictures...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="computeOffsets">
                    <property name="text">
                     <string comment="IDC_STACKING_COMPUTEOFFSETS">Compute offsets...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="stackChecked">
                    <property name="text">
                     <string comment="IDC_STACKING_STACKCHECKED">Stack checked pictures...</string>
                    </property>
                   </widget>
                  </item>
                  <item>
                   <widget class="QLabel" name="batchStacking">
                    <property name="text">
                     <string comment="IDC_STACKING_BATCHSTACK">Batch stacking...</string>
                    </property>
                   </widget>
                  </item>
                 </layout>
                </widget>
               </item>
              </layout>
             </widget>
            </item>
            <item>
             <spacer name="verticalSpacer_9">
              <property name="orientation">
               <enum>Qt::Orientation::Vertical</enum>
              </property>
              <property name="sizeHint" stdset="0">
               <size>
                <width>20</width>
                <height>1</height>
               </size>
              </property>
             </spacer>
            </item>
            <item>
             <widget class="QGroupBox" name="processing">
              <property name="sizePolicy">
               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
              <property name="styleSheet">
               <string notr="true"/>
              </property>
              <property name="title">
               <string comment="IDC_PROCESSING_TITLE">Processing</string>
              </property>
              <layout class="QVBoxLayout" name="verticalLayout_5">
               <property name="spacing">
                <number>4</number>
               </property>
               <property name="leftMargin">
                <number>11</number>
               </property>
               <property name="topMargin">
                <number>6</number>
               </property>
               <property name="rightMargin">
                <number>11</number>
               </property>
               <property name="bottomMargin">
                <number>6</number>
               </property>
               <item>
                <widget class="QLabel" name="openPicture">
                 <property name="text">
                  <string comment="IDC_PROCESSING_OPENFILE">Open picture file...</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="copyPicture">
                 <property name="text">
                  <string comment="IDC_PROCESSING_COPYTOCLIPBOARD">Copy current picture to clipboard</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="doStarMask">
                 <property name="text">
                  <string comment="IDC_PROCESSING_CREATESTARMASK">Create a Star Mask...</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="savePicture">
                 <property name="text">
                  <string comment="IDC_PROCESSING_SAVEFILE">Save picture to file...</string>
                 </property>
                </widget>
               </item>
              </layout>
             </widget>
            </item>
            <item>
             <spacer name="verticalSpacer_10">
              <property name="orientation">
               <enum>Qt::Orientation::Vertical</enum>
              </property>
              <property name="sizeHint" stdset="0">
               <size>
                <width>20</width>
                <height>1</height>
               </size>
              </property>
             </spacer>
            </item>
            <item>
             <widget class="QGroupBox" name="options">
              <property name="sizePolicy">
               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
              <property name="styleSheet">
               <string notr="true"/>
              </property>
              <property name="title">
               <string comment="IDC_OPTIONS_TITLE">Options</string>
              </property>
              <layout class="QVBoxLayout" name="verticalLayout_4">
               <property name="spacing">
                <number>4</number>
               </property>
               <property name="leftMargin">
                <number>11</number>
               </property>
               <property name="topMargin">
                <number>6</number>
               </property>
               <property name="rightMargin">
                <number>11</number>
               </property>
               <property name="bottomMargin">
                <number>6</number>
               </property>
               <item>
                <widget class="QLabel" name="settings">
                 <property name="text">
                  <string comment="IDC_OPTIONS_SETTINGS">Settings...</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="ddpSettings">
                 <property name="styleSheet">
                  <string notr="true">margin-left: 30</string>
                 </property>
                 <property name="text">
                  <string comment="IDC_OPTIONS_RAWDDPSETTINGS">Raw/FITS DDP Settings...</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="loadSettings">
                 <property name="styleSheet">
                  <string notr="true">margin-left: 30</string>
                 </property>
                 <property name="text">
                  <string comment="IDC_OPTIONS_LOADSETTINGS">Load...</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="saveSettings">
                 <property name="styleSheet">
                  <string notr="true">margin-left: 30</string>
                 </property>
                 <property name="text">
                  <string comment="IDC_OPTIONS_SAVESETTINGS">Save...</string>
                 </property>
                </widget>
               </item>
               <item>
                <widget class="QLabel" name="recommendedSettings">
                 <property name="styleSheet">
                  <string notr="true">margin-left: 30</string>
                 </property>
                 <property name="text">
                  <string comment="IDC_OPTIONS_RECOMMANDEDSETTINGS">Recommended...</string>
                 </property>
                </widget>
               </item>
               <item>
                <spacer name="verticalSpacer_2">
                 <property name="orientation">
                  <enum>Qt::Orientation::Vertical</enum>
                 </property>
                 <property name="sizeHint" stdset="0">
                  <size>
                   <width>20</width>
                   <height>5</height>
                  </size>
                 </property>
                </spacer>
               </item>
               <item>
                <widget class="QLabel" name="about">
                 <property name="text">
                  <string comment="IDC_ABOUT">About DeepSkyStacker...</string>
                 </property>
                </widget>
               </item>
               <item>
                <spacer name="verticalSpacer_5">
                 <property name="orientation">
                  <enum>Qt::Orientation::Vertical</enum>
                 </property>
                 <property name="sizeHint" stdset="0">
                  <size>
                   <width>20</width>
                   <height>5</height>
                  </size>
                 </property>
                </spacer>
               </item>
               <item>
                <widget class="QLabel" name="help">
                 <property name="text">
                  <string comment="IDC_CONTEXTHELP">DeepSkyStacker's Help...</string>
                 </property>
                </widget>
               </item>
               <item>
                <spacer name="verticalSpacer_6">
                 <property name="orientation">
                  <enum>Qt::Orientation::Vertical</enum>
                 </property>
                 <property name="sizeHint" stdset="0">
                  <size>
                   <width>20</width>
                   <height>5</height>
                  </size>
                 </property>
                </spacer>
               </item>
               <item>
                <widget class="QCheckBox" name="keepTracefile">
                 <property name="toolTip">
                  <string>The trace file is normally written to the DeepSkyStacker directory in the users
    &quot;Documents&quot; directory, and is deleted on exit (unless the application crashes).
    Tick this box to keep the trace file.</string>
                 </property>
                 <property name="text">
                  <string>Retain the trace file on exit</string>
                 </property>
                </widget>
               </item>
               <item>
                <spacer name="verticalSpacer_7">
                 <property name="orientation">
                  <enum>Qt::Orientation::Vertical</enum>
                 </property>
                 <property name="sizeHint" stdset="0">
                  <size>
                   <width>20</width>
                   <height>5</height>
                  </size>
                 </property>
                </spacer>
               </item>
               <item>
                <widget class="QCheckBox" name="enableSounds">
                 <property name="text">
                  <string>Enable progress sounds</string>
                 </property>
                 <property name="checked">
                  <bool>false</bool>
                 </property>
                </widget>
               </item>
               <item>
                <spacer name="verticalSpacer_8">
                 <property name="orientation">
                  <enum>Qt::Orientation::Vertical</enum>
                 </property>
                 <property name="sizeHint" stdset="0">
                  <size>
                   <width>20</width>
                   <height>5</height>
                  </size>
                 </property>
                </spacer>
               </item>
               <item>
                <widget class="QCheckBox" name="showClipping">
                 <property name="toolTip">
                  <string>In the Processing Panel, show pixels below the Black Level as blue and pixels above the White Level as red.</string>
                 </property>
                 <property name="text">
                  <string>Show clipping for Black/White Points</string>
                 </property>
                </widget>
               </item>
              </layout>
             </widget>
            </item>
            <item>
             <spacer name="verticalSpacer">
              <property name="orientation">
               <enum>Qt::Orientation::Vertical</enum>
              </property>
              <property name="sizeHint" stdset="0">
               <size>
                <width>20</width>
                <height>40</height>
               </size>
              </property>
             </spacer>
            </item>
           </layout>
          </widget>
         </widget>
        </item>
       </layout>
      </widget>
     </widget>
     <resources/>
     <connections/>
    </ui>
    

    If you can spot a mistake of mine that will be most helpful.

    If OTOH this is a known Linux problem, that too will be good to know.

    Thanks, David

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      I'm on Windows and this only happens when I set my screen scaling to something fractional, like 125%, otherwise it's fine. Do you have any scaling set?
      If so I would guess it's some sort of bug in the minimum size calculation of the labels or the frame where they don't do scaling correctly (maybe they round it down to an integer factor or something like that?).

      1 Reply Last reply
      1
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        I've not done anything to adjust the scaling on the Linux system that I took the screen shot from(*) - I only installed it this afternoon after getting a problem report from a user.

        (*) I wouldn't know how!!!

        David

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #4

          If it's anything like on Windows the scaling is set automatically when you install the OS based on the monitor physical size and resolution, but can be then changed in the display settings. From some screenshots on google I see Ubuntu has something like that, but I'm out of my element when it comes to Linux systems.

          Anyway, since it's reproducible on different systems and there's nothing wrong (that I can see) in the .ui file itself, I'd say report a bug.

          1 Reply Last reply
          0
          • PerdrixP Offline
            PerdrixP Offline
            Perdrix
            wrote on last edited by
            #5

            @Chris-Kawa Thanks for checking the ui file. OK I'll do that tomorrow.

            David

            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