QSplitter implements a splitter widget. More...
#include <qsplitter.h>
Inherits QFrame.
A splitter lets the user control the size of child widgets by dragging the boundary between the children.
The current implementation is limited to two children. The two widgets to be managed are the first two children added. If you need to split more than two widgets, you can nest splitters (although it may be difficult to control the relative sizing to your requirements).
To show a QListBox and a QMultiLineEdit side by side:
QSplitter *split = new QSplitter( parent ); QListBox *lb = new QListBox( split ); QMultiLineEdit *lb = new QMultiLineEdit( split );
In QSplitter the boundary can be either horizontal or vertical. The default is horizontal (the children are side by side) and you can use setOrientation( QSplitter::Vertical ) to set it to vertical.
By default, both widgets can be as large or as small as the user wishes. You can naturally use setMinimumSize() and/or setMaximumSize() on the children. Use setResizeMode() to specify that a widget should keep its size when the splitter is resized.
QSplitter normally resizes the children only at the end of a resize operation, but if you call setOpaqueResize( TRUE ), the widgets are resized as often as possible.
See also: QTabBar.
Creates a horizontal splitter.
Creates splitter with orientation o.
[protected]
Returns the legal position of the splitter closest to p.
[protected]
Tells the splitter that a child widget has been inserted.
[protected]
Tells the splitter that a child widget has been removed.
[virtual protected]
Draws the splitter handle in the rectangle described by x, y, w, h using painter p.
[virtual]
Reimplemented to provide childRemoveEvent(), childInsertEvent() and layoutHintEvent() without breaking binary compatibility.
Reimplemented from QObject.
[protected]
Tells the splitter that a child widget has changed layout parameters.
[protected]
Moves the left/top edge of the splitter handle as close as possible to p which is the distance from the left (or top) edge of the widget.
Only has effect if both widgets are set.
Moves w to the leftmost/top position.
Moves w to the rightmost/bottom position.
Returns TRUE if opaque resize is on, FALSE otherwise.
See also: setOpaqueResize().
Returns the orientation (Horizontal
or Vertical)
of the splitter.
See also: setOrientation().
Updates the splitter state. You should not need to call this function during normal operations.
Sets opaque resize to on. Opaque resize is initially turned off.
See also: opaqueResize().
Sets the orientation to o. By default the orientation is horizontal (the two widgets are side by side).
See also: orientation().
Sets resize mode of w to mode. mode can be one of:
Stretch
(the default) - w will resize when the splitter resizes
KeepSize
- w will keep its size.
[protected]
Shows a rubber band at position p. If p is negative, the rubber band is removed.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright İ 1998 Troll Tech | Trademarks | Qt version 1.42
|