📄 qsplitter.3qt
字号:
.TH QSplitter 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQSplitter \- QSplitter implements a splitter widget.SH SYNOPSIS.br.PP\fC#include <qsplitter.h>\fR.PPInherits QFrame..PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBResizeMode\fR { Stretch, KeepSize }".br.ti -1c.BI "\fBQSplitter\fR ( QWidget * " "parent" "=0, const char * " "name" "=0 )".br.ti -1c.BI "\fBQSplitter\fR ( Orientation, QWidget * " "parent" "=0, const char * " "name" "=0 )".br.ti -1c.BI "\fB~QSplitter\fR ()".br.ti -1c.BI "virtual void \fBsetOrientation\fR ( Orientation )".br.ti -1c.BI "Orientation \fBorientation\fR () const".br.ti -1c.BI "virtual void \fBsetResizeMode\fR ( QWidget * " "w" ", ResizeMode )".br.ti -1c.BI "virtual void \fBsetOpaqueResize\fR ( bool = TRUE )".br.ti -1c.BI "bool \fBopaqueResize\fR () const".br.ti -1c.BI "void \fBmoveToFirst\fR ( QWidget * )".br.ti -1c.BI "void \fBmoveToLast\fR ( QWidget * )".br.ti -1c.BI "void \fBrefresh\fR ()".br.ti -1c.BI "virtual QSize \fBsizeHint\fR () const".br.ti -1c.BI "virtual QSize \fBminimumSizeHint\fR () const".br.ti -1c.BI "virtual QSizePolicy \fBsizePolicy\fR () const".br.ti -1c.BI "QValueList<int> \fBsizes\fR () const".br.ti -1c.BI "void \fBsetSizes\fR ( QValueList<int> )".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBchildEvent\fR ( QChildEvent * )".br.ti -1c.BI "virtual bool \fBevent\fR ( QEvent * )".br.ti -1c.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * )".br.ti -1c.BI "int \fBidAfter\fR ( QWidget * ) const".br.ti -1c.BI "void \fBmoveSplitter\fR ( QCOORD " "pos" ", int id )".br.ti -1c.BI "virtual void \fBdrawSplitter\fR ( QPainter *, QCOORD " "x" ", QCOORD " "y" ", QCOORD " "w" ", QCOORD h )".br.ti -1c.BI "virtual void \fBstyleChange\fR ( QStyle & )".br.ti -1c.BI "int \fBadjustPos\fR ( int, int )".br.ti -1c.BI "virtual void \fBsetRubberband\fR ( int )".br.ti -1c.BI "void \fBgetRange\fR ( int " "id" ", int *, int * )".br.in -1c.SH DESCRIPTIONQSplitter implements a splitter widget..PPA splitter lets the user control the size of child widgets by dragging the boundary between the children. Any number of widgets may be controlled..PPTo show a QListBox, a QListView and a QMultiLineEdit side by side:.PP.nf.br QSplitter *split = new QSplitter( parent );.br QListBox *lb = new QListBox( split );.br QListView *lv = new QListView( split );.br QMultiLineEdit *ed = new QMultiLineEdit( split );.fi.PPIn 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..PPBy 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..PPQSplitter 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..PPThe 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..PPIf you hide() a child, its space will be distributed among the other children. When you show() it again, it will be reinstated..PP<img src=qsplitter-m.png> <img src=qsplitter-w.png>.PPSee also: QTabBar..PPExamples:.(lmainlyQt/editor.cpp splitter/splitter.cpp.)l.SH MEMBER FUNCTION DOCUMENTATION.SH "QSplitter::QSplitter ( Orientation o, QWidget * parent=0, const char * name=0 )"Creates splitter with orientation \fIo.\fR.SH "QSplitter::QSplitter ( QWidget * parent=0, const char * name=0 )"Creates a horizontal splitter..SH "QSplitter::~QSplitter ()"Destructs the splitter..SH "int QSplitter::adjustPos ( int p, int id ) \fC[protected]\fR"Returns the legal position closest to \fIp\fR of the splitter with id \fIid.\fR.PPSee also: idAfter()..SH "void QSplitter::childEvent ( QChildEvent * c ) \fC[virtual protected]\fR"Tells the splitter that a child widget has been inserted/removed..PPReimplemented from QObject..SH "void QSplitter::drawSplitter ( QPainter * p, QCOORD x, QCOORD y, QCOORD w, QCOORD h ) \fC[virtual protected]\fR"Draws the splitter handle in the rectangle described by \fIx, y, w, h\fR using painter \fIp.\fR.PPSee also: QStyle::drawSplitter..SH "bool QSplitter::event ( QEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QObject..SH "void QSplitter::getRange ( int id, int * min, int * max ) \fC[protected]\fR"Returns the valid range of the splitter with id \fIid\fR in \fImin\fR and \fImax.\fR.PPSee also: idAfter()..SH "int QSplitter::idAfter ( QWidget * w ) const \fC[protected]\fR"Returns the id of the splitter to the right of or below the widget \fIw,\fR or 0 if there is no such splitter. (ie. it is either not in this QSplitter, or it is at the end)..SH "QSize QSplitter::minimumSizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..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 \fIp\fR which is the distance from the left (or top) edge of the widget..PPSee also: idAfter()..SH "void QSplitter::moveToFirst ( QWidget * w )"Moves \fIw\fR to the leftmost/top position..PPExamples:.(lsplitter/splitter.cpp.)l.SH "void QSplitter::moveToLast ( QWidget * w )"Moves \fIw\fR to the rightmost/bottom position..SH "bool QSplitter::opaqueResize () const"Returns TRUE if opaque resize is on, FALSE otherwise..PPSee also: setOpaqueResize()..SH "Orientation QSplitter::orientation () const"Returns the orientation (\fCHorizontal\fR or \fCVertical)\fR of the splitter..PPSee also: setOrientation()..SH "void QSplitter::refresh ()"Updates the splitter state. You should not need to call this function during normal use of the splitter..SH "void QSplitter::setOpaqueResize ( bool on = TRUE ) \fC[virtual]\fR"Sets opaque resize to \fIon.\fR Opaque resize is initially turned off..PPSee also: opaqueResize()..PPExamples:.(lmainlyQt/editor.cpp splitter/splitter.cpp.)l.SH "void QSplitter::setOrientation ( Orientation o ) \fC[virtual]\fR"Sets the orientation to \fIo.\fR By default the orientation is horizontal (the widgets are side by side)..PPSee also: orientation()..SH "void QSplitter::setResizeMode ( QWidget * w, ResizeMode mode ) \fC[virtual]\fR"Sets resize mode of \fIw\fR to \fImode. mode\fR can be one of:.TP\fCStretch\fR (the default) - \fIw\fR will resize when the splitter resizes.TP\fCKeepSize\fR - \fIw\fR will keep its size..PPExamples:.(lsplitter/splitter.cpp.)l.SH "void QSplitter::setRubberband ( int p ) \fC[virtual protected]\fR"Shows a rubber band at position \fIp.\fR If \fIp\fR is negative, the rubber band is removed..SH "void QSplitter::setSizes ( QValueList<int> list )"Sets the size parameters to the values given in \fIlist.\fR Extra values in \fIlist\fR are ignored..PPIf \fIlist\fR contains to few values, the result is undefined but the program will still be well-behaved..SH "QSize QSplitter::sizeHint () const \fC[virtual]\fR"Returns a size based on the child widgets..PPReimplemented from QWidget..SH "QSizePolicy QSplitter::sizePolicy () const \fC[virtual]\fR"Says that this widget wants to grow in both height and width..PPReimplemented from QWidget..SH "QValueList<int> QSplitter::sizes () const"Returns a list of the size parameters of all the widgets in this splitter..PPGiving the values to setSizes() will give a splitter with the same layout as this one..SH "void QSplitter::styleChange ( QStyle & old ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "SEE ALSO".BR http://www.troll.no/qt/qsplitter.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS. See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -