Auto-expanding layout with Qt-Designer
Auto-expanding layout with Qt-Designer
The below given solution is easy:
After creating the QVBoxLayout in Qt Designer, right-click on the background of your widget/dialog/window but the parent and select Lay Out -> Lay Out in a Grid from the bottom of the context-menu. The QVBoxLayout have stretched to fit the window and will resize automatically when the entire window is resized.
Here the 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 the set top level layout, to preview the widget and attempt to resize the window by dragging the size grip.
To find a “fit to screen” property .
The setting widget’s “maximumSize” to a “some big number” will automatically fit the widget to the parent widget space