Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The qhboxlayout command creates a QHBoxLayout object, making it the active layout manager. This layout manager will automatically arrange widgets horizontally (just call qhboxlayout followed by the creation of the widgets).

Call qsetmargin to adjust the margin between the stacked widgets and the widget containing them, or use qsetspacing to adjust spacing between the stacked widgets.

For non-trivial layouts consider nesting widgets inside QWidgets that contain their own layout. This way you can simulate having one layout manager inside another allowing for mixed vertical and horizontal layouts. This technique is shown in #Nested Nested Layout.

See also qvboxlayout and qgridlayout.

Arguments

cmds

A block containing arguments, typically the widgets to be contained inside the layout.

...