VLayoutView:
Filter:
Classes | GUI > Views

VLayoutView : View : QObject : Object

A container view that arranges its children vertically
Subclasses: QVLayoutView

Description

NOTE: In Qt GUI, this class has been rendered obsolete by a special set of layout classes; they are easier to use and more flexible. See VLayout for an equivalent to this class, and Layout Management for a general description of the Qt layout system.

VLayoutView can be a parent to other views, and it automatically arranges its child views in vertical order, expanding their width to its own bounds. Only the height of the children is relevant.

When arranging its children, VLayoutView takes the values of their 'minHeight' and 'maxHeight' properties into account. This is useful when a child's resize mode is set to 4, 5, or 6. See examples below.

VLayoutView inherits some useful formatting methods from its superclasses.

NOTE: VLayoutView is designed mainly for grouping and placing widgets. While you can set it to accept key presses, it does not accept mouse clicks or drags.

Class Methods

Inherited class methods

Undocumented class methods

VLayoutView.qtClass

Instance Methods

Inherited instance methods

Examples

Stretching the layout view; Slider height is fixed:

Stretching the layout view and the contents; if all the contents are elastic, the heights of the contents are perfectly divided up. In this example, the StaticText is not elastic in order to preserve its height.

Mixed stretching modes:

Set minimum heights; beware that if the layout view height is smaller than the combined height of all the contents, things might disappear when you try to handle them with the mouse:

Spacing:

Nesting: use VLayoutView and HLayoutView in combination: