Reputation: 951
I am trying to design a form in which some elements stay at the bottom of the Form Layout when the window size is increased, and others stay at the top. Using a Vertical Spacer between the top and bottom elements almost works, but the Vertical Spacer only stretches up to the Height value of its SizeHint (see screenshots below).
Simply increasing the SizeHint to some large has the unwanted side effect that the preferred size of the overall window then also becomes very large, so the "Adjust Size (Ctrl+J)" command makes the window unacceptably large.
If I use a Vertical Layout instead of a Form Layout, the stretcher behaves as I expect it to, increasing indefinitely and respecting the SizeHint when using "Adjust Size", but of course I lose the behaviour of the form layout (the alignment of the TextLabels).
What can I do to make the Vertical Spacer stretch past its SizeHint in a Form Layout?
Upvotes: 1
Views: 3394
Reputation: 113
Use multiple layouts, not only one.
If I understood you correctly, you should get what you wanted :)
Another way is to use QGridLayout.
Upvotes: 1