Auto-expanding layout with Qt-Designer

前端 未结 5 545
借酒劲吻你
借酒劲吻你 2020-12-12 09:01

I\'m using the Qt Designer.

I want to create a QVBoxLayout which will automatically expand to fill the whole window.

The layout of the QVB

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 10:00

    According to the documentation, there needs to be a top level layout set.

    A top level layout is necessary to ensure that your widgets will resize correctly when its window is resized. To check if you have set a top level layout, preview your widget and attempt to resize the window by dragging the size grip.

    You can set one by clearing the selection and right clicking on the form itself and choosing one of the layouts available in the context menu.

提交回复
热议问题