Make a UI that stretches well
-
Good day fellow QT'ers, hope everyone is well. Was wondering how I'd go about making this stretchable? I read the Layout Guide in the QT docs and can't seem to get around the topic well. Thanks

You just placed your stuff on your form, right?
Right-click onto your dialog and set one or more layouts (Grid, Horizontal, Vertical or FormLayout).
Play around a bit and rearrange everything until you get your desired result :)
(You can also move in
QLayoutsdirectly by picking them in QtDesigner's Tool Menubar and dragging them onto your dialog. Then you can fill them with theQWidgetsyou want to use)Edit:
Do you use any layout right now? How does your widget tree on the right of QtDesigner look like?
-
Correct, I just placed the labels onto the form. There's no layout at all right now. When I compile and run, dragging the window edges leaves the labels in place, can I make them stretch out evenly and uniformly?

@BoGut said in Make a UI that stretches well:
can I make them stretch out evenly and uniformly?
As @Pl45m4 said, apply a layout: https://doc.qt.io/qt-5/designer-layouts.html
-
Correct, I just placed the labels onto the form. There's no layout at all right now. When I compile and run, dragging the window edges leaves the labels in place, can I make them stretch out evenly and uniformly?

-
The red, crossed circle icon next to your
QDialogindicates that this widget is missing a layout :)