Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to QVBoxLayout setFixedWidth
Forum Updated to NodeBB v4.3 + New Features

How to QVBoxLayout setFixedWidth

Scheduled Pinned Locked Moved Unsolved Qt for Python
5 Posts 3 Posters 433 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.
  • P Offline
    P Offline
    Penguin Powered Apps
    wrote on last edited by
    #1

    Hello Guys

    I have a main layout comprising of 2 sub layouts leftlayout and rightlayout. They are both QVBoxLayouts and i would like to the widths to 30% for the laeftlayout and 70% for the rightlayout.

    Any suggestions or tips would be appreciated.

    Thanks

    Simon

    1 Reply Last reply
    0
    • K Offline
      K Offline
      khryleption
      wrote on last edited by
      #2

      Hi,
      Try with QSplitter and function QSplitter::setStretchFactor

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Penguin Powered Apps
        wrote on last edited by
        #3

        Thanks i'll give it a go

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

          Hi,

          Unless you want them to be movable, use the stretch factor parameter when adding your sub-layout to your main layout.

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

          P 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Unless you want them to be movable, use the stretch factor parameter when adding your sub-layout to your main layout.

            P Offline
            P Offline
            Penguin Powered Apps
            wrote on last edited by
            #5

            @SGaist Thanks i will give that a try

            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