Important: Please read the Qt Code of Conduct -

Resizing a compound screen

  • I have a window with a TabWidget on it. In the TabWidget I have mutliple grid, horz and vert layouts. However, I can not get them to resize in real time as I change the size of the window. When I increase/descrease the size of the window(while the program is running), the elements just stay where they are and do not adjust (expand/shrink). Is the a good primer I could read on what is needed to make this work?


  • This is about the "Qt layout system": There is a good explanation from the docs.

    Normally when you use for instance a qgridlauout with 3x3 buttons in it they will spread evenly when the window resizes.
    So in your case there must be something else going on.
    without the code or the ui we can only guess. Did you put all those layouts you mentioned in a layout also?

  • My guess: the tab widget itself is not in a layout, or that layout is not the layout set on the form.

Log in to reply