| |||
| Classes - Annotated - Tree - Functions - Home - Structure | |||
The QSplitter class 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. Any number of widgets may be controlled.
To show a QListBox, a QListView and a QTextEdit side by side:
QSplitter *split = new QSplitter( parent );
QListBox *lb = new QListBox( split );
QListView *lv = new QListView( split );
QTextEdit *ed = new QTextEdit( 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, all widgets can be as large or as small as the user wishes, down to minimumSizeHint(). 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.
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.
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.
If you hide() a child its space will be distributed among the other children. It will be reinstated when you show() it again.
See also QTabBar.
This enum type describes how QSplitter will resize each of its child widgets. The currently defined values are:
See also idAfter().
Reimplemented from QObject.
See also QStyle::drawSplitter.
See also idAfter().
For hebrew and arabic the layout is reversed, and using this function to set the position of the splitter might lead to unexpected results. Especially, in hebrew and arabic, the position of splitter one is left of the position of splitter zero.
See also idAfter().
Example: splitter/splitter.cpp.
See also setOpaqueResize().
Returns the orientation of the splitter. See the "orientation" property for details.
Updates the splitter state. You should not need to call this function during normal use of the splitter.
See also opaqueResize().
Examples: mainlyQt/editor.cpp and splitter/splitter.cpp.
Sets the orientation of the splitter. See the "orientation" property for details.
See also ResizeMode.
Examples: fileiconview/mainwindow.cpp, ftpclient/ftpmainwindow.cpp, listviews/listviews.cpp and splitter/splitter.cpp.
If list contains too few values, the result is undefined but the program will still be well-behaved.
See also sizes().
Giving the values to setSizes() will give a splitter with the same layout as this one.
See also setSizes().
This property holds the orientation of the splitter.
By default the orientation is horizontal (the widgets are side by side).
Set this property's value with setOrientation() and get this property's value with orientation().
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
| Copyright © 2000 Trolltech | Trademarks | Qt version main-beta1
|