HLayoutView:
Filter:
Classes | GUI > Views

HLayoutView

A container view that arranges its children horizontally
Location: NOT INSTALLED!

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 HLayout for an equivalent to this class, and Layout Management for a general description of the Qt layout system.

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

When arranging its children, HLayoutView takes the values of their 'minWidth' and 'maxWidth' properties into account. This is useful when a child's resize mode is set to 2, 5, or 8. See examples below.

HLayoutView inherits some useful formatting methods from its superclasses.

NOTE: HLayoutView 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

Instance Methods

Inherited instance methods

Examples

Child view height fills the HLayoutView automatically:

Stretching the layout view; Slider height fills the View automatically:

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

Setting minWidth on contents; beware that if the layout view width is smaller than the combined width of all the contents, things might disappear when you try to handle them with the mouse:

Text flows:

Spacing: