QT / QT-Designer Question: Auto Resize Widget

Using QT-Designer, I put a container widget in the window. I would like him to click on the edges of the window and cover the entire client area. The window is resized.

Do I need to subscribe to resize and manually resize the child widget? or is there some kind of mechanism that I can use that does this automatically?

+7
source share
1 answer

Just select the widget of the main window in the form editor and tell it so that its children break horizontally (Ctrl-1) or vertically (Ctrl-2). They are under the "Form" menu.

(If you are using Qt Creator, use Ctrl-1, Ctrl-2, or under the menu under Tools β†’ Form Editor.)

If you change your mind later, you can break the layout and change the order of things.

"Extending to fill available space" is a general rule in Qt (as with most other toolkits). It might be worth reading QLayout and layout control in general .

+8
source

All Articles