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. Stretch factor property missing from QSplitter in Qt Designer property editor (bug/feature req/by design)?
Forum Updated to NodeBB v4.3 + New Features

Stretch factor property missing from QSplitter in Qt Designer property editor (bug/feature req/by design)?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 662 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.
  • A Offline
    A Offline
    A.v.O
    wrote on 17 Jul 2021, 09:07 last edited by A.v.O
    #1

    QSplitter vs QVBoxLayout

    I used the QSplitter in the Qt Designer for the first time.

    For some reason the stretch factor from QSplitter is not available in the Designer property editor as the "layoutStretch" from a layout.

      <layout class="QVBoxLayout" name="verticalLayout" stretch="1,0">
       <property name="sizeConstraint">
        <enum>QLayout::SetDefaultConstraint</enum>
       </property>
    

    I think this is an essential part of the QSplitter class to be able to change and exported to a ui-file like a layout.

    Now I have to call the splitter method (QSplitter::setStretchFactor) from code to set a stretch factor but this should not be the way to do it in my opinion.

    Is this a bug, feature request or is it deliberate just by design?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 17 Jul 2021, 09:29 last edited by
      #2

      @A-v-O said in Stretch factor property missing from QSplitter in Qt Designer property editor (bug/feature req/by design)?:

      Is this a bug, feature request or is it deliberate just by design?

      As described in the documentation it simply sets the stretch factor for the widgets of the splitter layout. So set the factor directly there.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • A Offline
        A Offline
        A.v.O
        wrote on 20 Jul 2021, 22:54 last edited by A.v.O
        #3

        @Christian-Ehrlicher said in Stretch factor property missing from QSplitter in Qt Designer property editor (bug/feature req/by design)?:

        As described in the documentation it simply sets the stretch factor for the widgets of the splitter layout. So set the factor directly there.

        Thanks I also found out that there was a relation between the stretch factor from the widgets and in the Splitter.
        So there could be 2 locations to set the same value.

        Problem solved :)

        1 Reply Last reply
        0

        1/3

        17 Jul 2021, 09:07

        • Login

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