📄 qboxlayout.3qt
字号:
.TP\fCQBoxLayout::Up\fR - The same as BottomToTop.SH MEMBER FUNCTION DOCUMENTATION.SH "QBoxLayout::QBoxLayout ( QWidget * parent, Direction d, int margin = 0, int spacing = -1, const char * name = 0 )"Constructs a new QBoxLayout with direction \fId\fR and main widget \fIparent\fR. \fIparent\fR may not be 0..PPThe \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..PP\fIname\fR is the internal object name..PPSee also direction()..SH "QBoxLayout::QBoxLayout ( QLayout * parentLayout, Direction d, int spacing = -1, const char * name = 0 )"Constructs a new QBoxLayout called \fIname\fR, with direction \fId\fR, and inserts it into \fIparentLayout\fR..PPThe \fIspacing\fR is the default number of pixels between neighboring children. If \fIspacing\fR is -1, the layout will inherit its parent's spacing()..SH "QBoxLayout::QBoxLayout ( Direction d, int spacing = -1, const char * name = 0 )"Constructs a new QBoxLayout called \fIname\fR, with direction \fId\fR..PPIf \fIspacing\fR is -1, the layout will inherit its parent's spacing(); otherwise \fIspacing\fR is used..PPYou must insert this box into another layout..SH "QBoxLayout::~QBoxLayout ()"Destroys this box layout..PPThe layout's widgets aren't destroyed..SH "void QBoxLayout::addItem ( QLayoutItem * item )\fC [virtual]\fR"Adds \fIitem\fR to the end of this box layout..PPExamples:.)l chart/optionsform.cpp and chart/setdataform.cpp..PPReimplemented from QLayout..SH "void QBoxLayout::addLayout ( QLayout * layout, int stretch = 0 )"Adds \fIlayout\fR to the end of the box, with serial stretch factor \fIstretch\fR..PPSee also insertLayout(), setAutoAdd(), addWidget(), and addSpacing()..PPExamples:.)l chart/optionsform.cpp, chart/setdataform.cpp, fonts/simple-qfont-demo/viewer.cpp, listbox/listbox.cpp, and tictac/tictac.cpp..SH "void QBoxLayout::addSpacing ( int size )"Adds a non-stretchable space with size \fIsize\fR to the end of this box layout. QBoxLayout provides default margin and spacing. This function adds additional space..PPSee also insertSpacing() and addStretch()..PPExample: listbox/listbox.cpp..SH "void QBoxLayout::addStretch ( int stretch = 0 )"Adds a stretchable space with zero minimum size and stretch factor \fIstretch\fR to the end of this box layout..PPSee also addSpacing()..PPExamples:.)l layout/layout.cpp, listbox/listbox.cpp, and t13/gamebrd.cpp..SH "void QBoxLayout::addStrut ( int size )"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..SH "void QBoxLayout::addWidget ( QWidget * widget, int stretch = 0, int alignment = 0 )"Adds \fIwidget\fR to the end of this box layout, with a stretch factor of \fIstretch\fR and alignment \fIalignment\fR..PPThe stretch factor applies only in the direction of the QBoxLayout, and is relative to the other boxes and widgets in this QBoxLayout. Widgets and boxes with higher stretch factors grow more..PPIf the stretch factor is 0 and nothing else in the QBoxLayout has a stretch factor greater than zero, the space is distributed according to the QWidget:sizePolicy() of each widget that's involved..PPAlignment is specified by \fIalignment\fR which is a bitwise OR of Qt::AlignmentFlags values. The default alignment is 0, which means that the widget fills the entire cell..PPFrom Qt 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()..PPSee also insertWidget(), setAutoAdd(), addLayout(), and addSpacing()..PPExamples:.)l chart/optionsform.cpp, checklists/checklists.cpp, layout/layout.cpp, lineedits/lineedits.cpp, listbox/listbox.cpp, t13/gamebrd.cpp, and t13/lcdrange.cpp..SH "Direction QBoxLayout::direction () const"Returns the direction of the box. addWidget() and addSpacing() work in this direction; the stretch stretches in this direction..PPSee also QBoxLayout::Direction, addWidget(), and addSpacing()..SH "QSizePolicy::ExpandData QBoxLayout::expanding () const\fC [virtual]\fR"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..PPReimplemented from QLayout..SH "int QBoxLayout::findWidget ( QWidget * w )"Searches for widget \fIw\fR in this layout (not including child layouts)..PPReturns the index of \fIw\fR, or -1 if \fIw\fR is not found..SH "bool QBoxLayout::hasHeightForWidth () const\fC [virtual]\fR"Returns TRUE if this layout's preferred height depends on its width; otherwise returns FALSE..PPReimplemented from QLayoutItem..SH "int QBoxLayout::heightForWidth ( int w ) const\fC [virtual]\fR"Returns the layout's preferred height when it is \fIw\fR pixels wide..PPReimplemented from QLayoutItem..SH "void QBoxLayout::insertItem ( int index, QLayoutItem * item )\fC [protected]\fR"Inserts \fIitem\fR into this box layout at position \fIindex\fR. If \fIindex\fR is negative, the item is added at the end..PP\fBWarning:\fR Does not call QLayout::insertChildLayout() if \fIitem\fR is a QLayout..PPSee also addItem() and findWidget()..SH "void QBoxLayout::insertLayout ( int index, QLayout * layout, int stretch = 0 )"Inserts \fIlayout\fR at position \fIindex\fR, with stretch factor \fIstretch\fR. If \fIindex\fR is negative, the layout is added at the end..PPSee also setAutoAdd(), insertWidget(), and insertSpacing()..SH "void QBoxLayout::insertSpacing ( int index, int size )"Inserts a non-stretchable space at position \fIindex\fR, with size \fIsize\fR. If \fIindex\fR is negative the space is added at the end..PPThe box layout has default margin and spacing. This function adds additional space..PPSee also insertStretch()..SH "void QBoxLayout::insertStretch ( int index, int stretch = 0 )"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..PPSee also insertSpacing()..SH "void QBoxLayout::insertWidget ( int index, QWidget * widget, int stretch = 0, int alignment = 0 )"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..PPThe stretch factor applies only in the direction of the QBoxLayout, and is relative to the other boxes and widgets in this QBoxLayout. Widgets and boxes with higher stretch factors grow more..PPIf the stretch factor is 0 and nothing else in the QBoxLayout has a stretch factor greater than zero, the space is distributed according to the QWidget:sizePolicy() of each widget that's involved..PPAlignment is specified by \fIalignment\fR, which is a bitwise OR of Qt::AlignmentFlags values. The default alignment is 0, which means that the widget fills the entire cell..PPFrom Qt 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()..PPSee also setAutoAdd(), insertLayout(), and insertSpacing()..SH "void QBoxLayout::invalidate ()\fC [virtual]\fR"Resets cached information..PPReimplemented from QLayout..SH "QSize QBoxLayout::maximumSize () const\fC [virtual]\fR"Returns the maximum size needed by this box layout..PPReimplemented from QLayout..SH "QSize QBoxLayout::minimumSize () const\fC [virtual]\fR"Returns the minimum size needed by this box layout..PPReimplemented from QLayout..SH "void QBoxLayout::setDirection ( Direction direction )"Sets the direction of this layout to \fIdirection\fR..SH "void QBoxLayout::setGeometry ( const QRect & r )\fC [virtual]\fR"Resizes managed widgets within the rectangle \fIr\fR..PPReimplemented from QLayout..SH "bool QBoxLayout::setStretchFactor ( QWidget * w, int stretch )"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..SH "bool QBoxLayout::setStretchFactor ( QLayout * l, int stretch )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets 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..SH "QSize QBoxLayout::sizeHint () const\fC [virtual]\fR"Returns the preferred size of this box layout..PPReimplemented from QLayoutItem..SH "SEE ALSO".BR http://doc.trolltech.com/qboxlayout.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qboxlayout.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -