The only post similar to this I could find is https://forum.qt.io/topic/62467/2-horizontal-layouts-1-with-fixed-height - but unfortunately, it does not answer what I want to ask here.
This is the layout I got to:
So, I have a main QVBoxLayout, inside it I have two QHBoxLayout. I want the top QHBoxLayout to contain a single label that will stretch horizontally, but have a fixed height of 64 pixels. And from the linked post:
So with layouts, u set constraints on the widgets, not on the layouts.
That is what I had done in the screen shot above, however:
- The top QHBoxLayout still takes up half of the window (judging by the red border), and the label is centered vertically in it.
What I want is: the label should be aligned to top of the window - and the layout should "wrap" around it, so I end up with a red layout border on top that is 64 pixels (plus whatever padding/margins may be there).
Is this possible to do in QtDesigner, and if so - how?