📄 qlayout.3qt
字号:
.SH "QRect QLayout::alignmentRect ( const QRect & r ) const\fC [protected]\fR"Returns the rectangle that should be covered when the geometry of this layout is set to \fIr\fR, provided that this layout supports setAlignment()..PPThe result is derived from sizeHint() and expanding(). It is never larger than \fIr\fR..SH "bool QLayout::autoAdd () const"Returns TRUE if this layout automatically grabs all new mainWidget()'s new children and adds them as defined by addItem(); otherwise returns FALSE. This has effect only for top-level layouts, i.e. layouts that are direct children of their mainWidget()..PPautoAdd() is disabled by default..PPNote that a top-level layout is not necessarily associated with the top-level widget..PPSee also setAutoAdd()..SH "void QLayout::deleteAllItems ()\fC [protected]\fR"Removes and deletes all items in this layout..SH "QSizePolicy::ExpandData QLayout::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..PPThe default implementation returns \fCBothDirections\fR..PPExamples:.)l customlayout/border.cpp and customlayout/flow.cpp..PPReimplemented from QLayoutItem..PPReimplemented in QGridLayout and QBoxLayout..SH "void QLayout::invalidate ()\fC [virtual]\fR"Invalidates cached information. Reimplementations must call this..PPReimplemented from QLayoutItem..PPReimplemented in QGridLayout and QBoxLayout..SH "bool QLayout::isEmpty () const\fC [virtual]\fR"Returns TRUE if this layout is empty. The default implementation returns FALSE..PPReimplemented from QLayoutItem..SH "bool QLayout::isEnabled () const"Returns TRUE if the layout is enabled; otherwise returns FALSE..PPSee also setEnabled()..SH "bool QLayout::isTopLevel () const"Returns TRUE if this layout is a top-level layout, i.e. not a child of another layout; otherwise returns FALSE..SH "QLayoutIterator QLayout::iterator ()\fC [pure virtual]\fR"Implemented in subclasses to return an iterator that iterates over this layout's children..PPA typical implementation will be:.PP.nf.br QLayoutIterator MyLayout::iterator().br {.br QGLayoutIterator *i = new MyLayoutIterator( internal_data );.br return QLayoutIterator( i );.br }.br.fiwhere MyLayoutIterator is a subclass of QGLayoutIterator..PPExamples:.)l customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp..PPReimplemented from QLayoutItem..SH "QWidget * QLayout::mainWidget ()"Returns the main widget (parent widget) of this layout, or 0 if this layout is a sub-layout that is not yet inserted..SH "int QLayout::margin () const"Returns the width of the outside border of the layout. See the "margin" property for details..SH "QSize QLayout::maximumSize () const\fC [virtual]\fR"Returns the maximum size of this layout. This is the largest size that the layout can have while still respecting the specifications. Does not include what's needed by margin() or menuBar()..PPThe default implementation allows unlimited resizing..PPReimplemented from QLayoutItem..PPReimplemented in QGridLayout and QBoxLayout..SH "QMenuBar * QLayout::menuBar () const"Returns the menu bar set for this layout, or 0 if no menu bar is set..SH "QSize QLayout::minimumSize () const\fC [virtual]\fR"Returns the minimum size of this layout. This is the smallest size that the layout can have while still respecting the specifications. Does not include what's needed by margin() or menuBar()..PPThe default implementation allows unlimited resizing..PPExamples:.)l customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp..PPReimplemented from QLayoutItem..PPReimplemented in QGridLayout and QBoxLayout..SH "void QLayout::remove ( QWidget * widget )"Removes the widget \fIwidget\fR from the layout. After this call, it is the caller's responsibility to give the widget a reasonable geometry or to put the widget back into a layout..PPSee also removeItem(), QWidget::geometry, and add()..SH "void QLayout::removeItem ( QLayoutItem * item )"Removes the layout item \fIitem\fR from the layout. It is the caller's responsibility to delete the item..PPNotice that \fIitem\fR can be a layout (since QLayout inherits QLayoutItem)..PPSee also remove() and addItem()..SH "ResizeMode QLayout::resizeMode () const"Returns the resize mode of the layout. See the "resizeMode" property for details..SH "void QLayout::setAutoAdd ( bool b )\fC [virtual]\fR"If \fIb\fR is TRUE, auto-add is enabled; otherwise auto-add is disabled..PPSee also autoAdd()..PPExample: i18n/main.cpp..SH "void QLayout::setEnabled ( bool enable )"Enables this layout if \fIenable\fR is TRUE, otherwise disables it..PPAn enabled layout adjusts dynamically to changes; a disabled layout acts as if it did not exist..PPBy default all layouts are enabled..PPSee also isEnabled()..SH "void QLayout::setGeometry ( const QRect & r )\fC [pure virtual]\fR"This function is reimplemented in subclasses to perform layout..PPThe default implementation maintains the geometry() information given by rect \fIr\fR. Reimplementors must call this function..PPExamples:.)l customlayout/border.cpp, customlayout/card.cpp, and customlayout/flow.cpp..PPReimplemented from QLayoutItem..PPReimplemented in QGridLayout and QBoxLayout..SH "void QLayout::setMargin ( int )\fC [virtual]\fR"Sets the width of the outside border of the layout. See the "margin" property for details..SH "void QLayout::setMenuBar ( QMenuBar * w )\fC [virtual]\fR"Makes the geometry manager take account of the menu bar \fIw\fR. All child widgets are placed below the bottom edge of the menu bar..PPA menu bar does its own geometry management: never do addWidget() on a QMenuBar..PPExamples:.)l layout/layout.cpp and scrollview/scrollview.cpp..SH "void QLayout::setResizeMode ( ResizeMode )"Sets the resize mode of the layout. See the "resizeMode" property for details..SH "void QLayout::setSpacing ( int )\fC [virtual]\fR"Sets the spacing between widgets inside the layout. See the "spacing" property for details..SH "void QLayout::setSupportsMargin ( bool b )\fC [protected]\fR"Sets the value returned by supportsMargin(). If \fIb\fR is TRUE, margin() handling is implemented by the subclass. If \fIb\fR is FALSE (the default), QLayout will add margin() around top-level layouts..PPIf \fIb\fR is TRUE, margin handling needs to be implemented in setGeometry(), maximumSize(), minimumSize(), sizeHint() and heightForWidth()..PPSee also supportsMargin()..SH "int QLayout::spacing () const"Returns the spacing between widgets inside the layout. See the "spacing" property for details..SH "bool QLayout::supportsMargin () const"Returns TRUE if this layout supports QLayout::margin on non-top-level layouts; otherwise returns FALSE..PPSee also margin..SS "Property Documentation".SH "int margin"This property holds the width of the outside border of the layout..PPFor some layout classes this property has an effect only on top-level layouts; QBoxLayout and QGridLayout support margins for child layouts. The default value is 0..PPSee also spacing..PPSet this property's value with setMargin() and get this property's value with margin()..SH "ResizeMode resizeMode"This property holds the resize mode of the layout..PPThe default mode is Auto..PPSee also QLayout::ResizeMode..PPSet this property's value with setResizeMode() and get this property's value with resizeMode()..SH "int spacing"This property holds the spacing between widgets inside the layout..PPThe default value is -1, which signifies that the layout's spacing should not override the widget's spacing..PPSee also margin..PPSet this property's value with setSpacing() and get this property's value with spacing()..SH "SEE ALSO".BR http://doc.trolltech.com/qlayout.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 (qlayout.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -