Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.15.0
-
None
Description
The designer does not allow you to set the layout alignment by right clicking on a layout, it can only be set for widgets that way. The only way to set the alignment of layouts directly seems to be through code. If I manually put the alignment property into the UI form, it will show at runtime, but is not respected by the designer or its preview display.
<layout class="QVBoxLayout" name="propertiesLayout"> <property name="alignment"> <set>Qt::AlignTop</set> </property>
A workaround is to add the layout to a widget and set the alignment of the widget, or make use of spacer items. Neither of these are ideal as they require much bigger diff changes to a layout.