How to make a Qt Widget grow with the window size?

后端 未结 4 1974
灰色年华
灰色年华 2020-11-29 18:38

I want to have a small QFormLayout that grows to fill its parent widget.

I created a new .ui file using the QWidget template in Qt

4条回答
  •  难免孤独
    2020-11-29 19:12

    I found it was impossible to assign a layout to the centralwidget until I had added at least one child beneath it. Then I could highlight the tiny icon with the red 'disabled' mark and then click on a layout in the Designer toolbar at top.

提交回复
热议问题