Important: Please read the Qt Code of Conduct -

I need some help with layouts.

  • I'm trying to create a widget where some controls can resize while others cannot (specifically see this picture ). I've tried some combination of layouts but none of them worked as I intended. Can anyone help please ?

  • Sorry mate, but this kind of question will not yield smart replies. Play around with the size hints, "Preferred" and "Expanding" are usually the most useful. Read the documentation.

  • Hi,
    Try to set a fixed size to the widgets you want to stay the same and the rest in the layout should resize as you resize the window.It should be something like


  • I would suggest that you do not use setFixedSize() to set the size, it might complicate things in future.

    What I do suggest:

    1. Make the Horizontal and Vertical Size policies of each of the Group Boxes 'Minimum'.
    2. Make the Horizontal and Vertical size policies of the TextLabel Expanding.
    3. Add a vertical spacer under the 2 GroupBoxes

    That should give you what you are looking for (I hope).

    (see )[edit: fixed link]


Log in to reply