A splitter lets the user control the size of child widgets by dragging the boundary between the children. Any number of widgets may be controlled by a single splitter.
.PP
To show a QListBox, a QListView and a QTextEdit side by side:
.PP
.nf
.br
QSplitter *split = new QSplitter( parent );
.br
QListBox *lb = new QListBox( split );
.br
QListView *lv = new QListView( split );
.br
QTextEdit *ed = new QTextEdit( split );
.br
.fi
.PP
QSplitter lays out its children horizontally (side by side); you can use setOrientation(QSplitter::Vertical) to lay out the children vertically.
.PP
By default, all widgets can be as large or as small as the user wishes, between the minimumSizeHint() (or minimumSize()) and maximumSize() of the widgets. Use setResizeMode() to specify that a widget should keep its size when the splitter is resized, or set the stretch component of the sizePolicy.
.PP
Although QSplitter normally resizes the children only at the end of a resize operation, if you call setOpaqueResize(TRUE) the widgets are resized as often as possible.
.PP
The initial distribution of size between the widgets is determined by the initial size of each widget. You can also use setSizes() to set the sizes of all the widgets. The function sizes() returns the sizes set by the user.
.PP
If you hide() a child its space will be distributed among the other children. It will be reinstated when you show() it again. It is also possible to reorder the widgets within the splitter using moveToFirst() and moveToLast().
.PP
.ce 1
.B "[Image Omitted]"
.PP
.ce 1
.B "[Image Omitted]"
.PP
See also QTabBar and Organizers.
.SS "Member Type Documentation"
.SH "QSplitter::ResizeMode"
This enum type describes how QSplitter will resize each of its child widgets.
.TP
\fCQSplitter::Auto\fR - The widget will be resized according to the stretch factors set in its sizePolicy().
.TP
\fCQSplitter::Stretch\fR - The widget will be resized when the splitter itself is resized.
.TP
\fCQSplitter::KeepSize\fR - QSplitter will try to keep the widget's size unchanged.
.TP
\fCQSplitter::FollowSizeHint\fR - QSplitter will resize the widget when the widget's size hint changes.
Returns the ID of the widget to the right of or below the widget \fIw\fR, or 0 if there is no such widget (i.e. it is either not in this QSplitter or \fIw\fR is at the end).
.SH "void QSplitter::moveSplitter ( QCOORD p, int id )\fC [protected]\fR"
Moves the left/top edge of the splitter handle with ID \fIid\fR as close as possible to position \fIp\fR, which is the distance from the left (or top) edge of the widget.
.PP
For Arabic, Hebrew and other right-to-left languages the layout is reversed. \fIp\fR is then the distance from the right (or top) edge of the widget.
Sets whether the child widget \fIw\fR is collapsible to \fIcollapse\fR.
.PP
By default, children are collapsible, meaning that the user can resize them down to size 0, even if they have a non-zero minimumSize() or minimumSizeHint(). This behavior can be changed on a per-widget basis by calling this function, or globally for all the widgets in the splitter by setting the childrenCollapsible property.
.PP
See also childrenCollapsible.
.SH "void QSplitter::setHandleWidth ( int )"
Sets the width of the splitter handle. See the "handleWidth" property for details.
Sets the size parameters to the values given in the \fIlist\fR. If the splitter is horizontal, the values set the widths of each widget going from left to right. If the splitter is vertical, the values set the heights of each widget going from top to bottom. Extra values in the \fIlist\fR are ignored.
.PP
If \fIlist\fR contains too few values, the result is undefined but the program will still be well-behaved.
.PP
Note that the values in \fIlist\fR should be the height/width that the widgets should be resized to.
Returns a list of the size parameters of all the widgets in this splitter.
.PP
If the splitter's orientation is horizontal, the list is a list of widget widths; if the orientation is vertical, the list is a list of widget heights.
.PP
Giving the values to another splitter's setSizes() function will produce a splitter with the same layout as this one.
.PP
Note that if you want to iterate over the list, you should iterate over a copy, e.g.
Reads the sizes and the hidden state of the widgets in the splitter \fIsplitter\fR from the text stream \fIts\fR. The sizes must have been previously written by the operator<<() function.