-
Notifications
You must be signed in to change notification settings - Fork 1
Layout
cybertron edited this page Aug 24, 2012
·
2 revisions
Layouts allow use of the Qt box layouts in whee. Any widgets below the layout in the configuration hierarchy will be managed by the layout, and layouts can be nested. They use the following unique parameters:
- Orientation Can be vertical or horizontal, similar to the Image subtype of the other widgets.
- Spacing The spacing between items in the layout - see the QBoxLayout spacing documentation for more details
- Margins The margins around the outside of the layout. Defined in the following order: left, top, right, bottom
Layouts also have a special type of child widget, with a type of Stretch. This can be used to fill in empty space inside the layout. This type of widget recognizes exactly one parameter: Amount. This can be used to set the relative amount of space a stretch widget takes up if multiple stretches are used. Otherwise it does not need to be specified and the stretch will fill all available space.
Example (values shown are the defaults):
Widget
Type Layout
Orientation Vertical
Spacing 5
Margins 10 10 10 10
Widget
...
Widget
Type Stretch
Amount 2
Widget
...
Widget
Type Stretch
Amount 1