WHBoxLayout [doc] and WVBoxLayout [doc]
These classes provide a horizontal or vertical layout of widgets
inside a WContainerWidget.
In the example below, a WHBoxLayout with default padding (9
pixels) and spacing (6 pixels) is used to manage two child
widgets. If no stretch factors have been specified, space is
evenly distributed to all widgets.
If we give Item 1 a non-zero stretch factor, then Item 2 will
only use its minimum width, and Item 1 will get all remaining
space, as illustrated below.
WVBoxLayout works in exactly the same way, but stacks children
vertically.
Layout managers may be arbitrarily nested to create complex
layouts. In the example below, we nested a WHBoxLayout with
items 2 and 3 inside a WVBoxLayout with item 1.