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. Shrinking widgets proportionally

Shrinking widgets proportionally

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 956 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.
  • M Offline
    M Offline
    Misty River
    wrote on last edited by
    #1

    Hi, I have a widget window that contains a GraphicsView and a widget and they are in a vertical layout. The problem I have is when I shrink the window vertically the View shrinks to it's minimal height before the widget even start shrinking.. I would like if they both shrink at the same time.. you know.. how can I control the order in which they shrink and the magnitude of it??

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

      Set the vertical size policy to 'expanding' in both widgets and then set the vertical stretch value to 1 in both of them.
      You can control the ratio they occupy space via the stretch value, eg. if you want the first one to always take 1/3 of the space then set its value to 1 and the other one to 2.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Misty River
        wrote on last edited by
        #3

        Ok thx that works

        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