TQBoxLayout takes the space it gets (from its parent layout or from the mainWidget()), divides it up into a row of boxes, and makes each managed widget fill one box.
If the TQBoxLayout's orientation is Horizontal the boxes are placed in a row, with suitable sizes. Each widget (or other box) will get at least its minimum size and at most its maximum size. Any excess space is shared according to the stretch factors (more about that below).
The easiest way to create a TQBoxLayout is to use one of the convenience classes, e.g. TQHBoxLayout (for Horizontal boxes) or TQVBoxLayout (for Vertical boxes). You can also use the TQBoxLayout constructor directly, specifying its direction as LeftToRight, Down, RightToLeft or Up.
If the TQBoxLayout is not the top-level layout (i.e. it is not managing all of the widget's area and children), you must add it to its parent layout before you can do anything with it. The normal way to add a layout is by calling parentLayout->addLayout().
setSpacing() sets the width between neighboring boxes. (You can use addSpacing() to get more space at a particular spot.)
.PP
The margin defaults to 0. The spacing defaults to the same as the margin width for a top-level layout, or to the same as the parent layout. Both are parameters to the constructor.
To remove a widget from a layout, call remove(). Calling TQWidget::hide() on a widget also effectively removes the widget from the layout until TQWidget::show() is called.
The \fImargin\fR is the number of pixels between the edge of the widget and its managed children. The \fIspacing\fR is the default number of pixels between neighboring children. If \fIspacing\fR is -1 the value of \fImargin\fR is used for \fIspacing\fR.
The \fIspacing\fR is the default number of pixels between neighboring children. If \fIspacing\fR is -1, the layout will inherit its parent's spacing().
Adds \fIlayout\fR to the end of the box, with serial stretch factor \fIstretch\fR.
.PP
When a layout is constructed with another layout as its parent, you don't need to call addLayout(); the child layout is automatically added to the parent layout as it is constructed.
.PP
See also insertLayout(), setAutoAdd(), addWidget(), and addSpacing().
Adds a non-stretchable space with size \fIsize\fR to the end of this box layout. TQBoxLayout provides default margin and spacing. This function adds additional space.
Limits the perpendicular dimension of the box (e.g. height if the box is LeftToRight) to a minimum of \fIsize\fR. Other constraints may increase the limit.
The stretch factor applies only in the direction of the TQBoxLayout, and is relative to the other boxes and widgets in this TQBoxLayout. Widgets and boxes with higher stretch factors grow more.
If the stretch factor is 0 and nothing else in the TQBoxLayout has a stretch factor greater than zero, the space is distributed according to the TQWidget:sizePolicy() of each widget that's involved.
Alignment is specified by \fIalignment\fR which is a bitwise OR of TQt::AlignmentFlags values. The default alignment is 0, which means that the widget fills the entire cell.
From TQt 3.0, the \fIalignment\fR parameter is interpreted more aggressively than in previous versions of Qt. A non-default alignment now indicates that the widget should not grow to fill the available space, but should be sized according to sizeHint().
Returns whether this layout can make use of more space than sizeHint(). A value of Vertical or Horizontal means that it wants to grow in only one dimension, whereas \fCBothDirections\fR means that it wants to grow in both dimensions.
Inserts a stretchable space at position \fIindex\fR, with zero minimum size and stretch factor \fIstretch\fR. If \fIindex\fR is negative the space is added at the end.
Inserts \fIwidget\fR at position \fIindex\fR, with stretch factor \fIstretch\fR and alignment \fIalignment\fR. If \fIindex\fR is negative, the widget is added at the end.
The stretch factor applies only in the direction of the TQBoxLayout, and is relative to the other boxes and widgets in this TQBoxLayout. Widgets and boxes with higher stretch factors grow more.
If the stretch factor is 0 and nothing else in the TQBoxLayout has a stretch factor greater than zero, the space is distributed according to the TQWidget:sizePolicy() of each widget that's involved.
Alignment is specified by \fIalignment\fR, which is a bitwise OR of TQt::AlignmentFlags values. The default alignment is 0, which means that the widget fills the entire cell.
From TQt 3.0, the \fIalignment\fR parameter is interpreted more aggressively than in previous versions of Qt. A non-default alignment now indicates that the widget should not grow to fill the available space, but should be sized according to sizeHint().
Sets the stretch factor for widget \fIw\fR to \fIstretch\fR and returns TRUE if \fIw\fR is found in this layout (not including child layouts); otherwise returns FALSE.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets the stretch factor for the layout \fIl\fR to \fIstretch\fR and returns TRUE if \fIl\fR is found in this layout (not including child layouts); otherwise returns FALSE.