Reputation: 803
I'm using qt designer only for ui layout
This is almost the same question as this one : QVBoxLayout: How to vertically align widgets to the top instead of the center
but i'm interested on how to do that in qt designer. I don't see any option in QVBoxLayout for that top alignment.
Upvotes: 8
Views: 15685
Reputation: 473
I had the same problem, but solved it a different way, it even shows up on-screen:
Add whatever controls you want to the QVBoxLayout, then at the end add a Spacer (verticalSpacer), this pushes everything to the top, or you can add the verticalSpacer first to push everything down.
Upvotes: 1
Reputation: 120578
Right-click the relevant widget and select Layout alignment > Top.
(NB: the new alignment will only be shown in preview mode).
Upvotes: 12