⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qgridlayout.3qt

📁 Trolltech公司发布的基于C++图形开发环境
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.SH "QGridLayout::QGridLayout ( QWidget * parent, int nRows = 1, int nCols = 1, int border=0, int space = -1, const char * name=0 )"Constructs a new QGridLayout with \fInRows\fR rows, \fInCols\fR columns and main widget \fIparent. parent\fR may not be 0..PP\fIborder\fR is the number of pixels between the edge of the widget and the managed children. \fIspace\fR is the default number of pixels between cells. If \fIspace\fR is -1 the value of \fIborder\fR is used..PP\fIname\fR is the internal object name..SH "QGridLayout::QGridLayout ( int nRows = 1, int nCols = 1, int space = -1, const char * name=0 )"Constructs a new grid with \fInRows\fR rows and \fInCols\fR columns, If \fIspace\fR is -1, this QGridLayout will inherits its parent's spacing(), otherwise \fIspace\fR is used..PPYou have to insert this grid into another layout. You can insert widgets and layouts in this layout at any time, but layout will not be performed before it is inserted..SH "QGridLayout::~QGridLayout ()"Destructs the grid layout. Geometry management is terminated if this is a top-level grid..SH "void QGridLayout::add ( QLayoutItem * item, int row, int col ) \fC[protected]\fR"Adds \fIitem\fR at position \fIrow, col.\fR The layout takes over ownership of \fIitem.\fR.SH "void QGridLayout::addColSpacing ( int col, int minsize )"Sets the minimum width of \fIcol\fR to \fIminsize\fR pixels..SH "void QGridLayout::addItem ( QLayoutItem * item ) \fC[virtual]\fR"Adds \fIitem\fR to the next free position of this layout..PPReimplemented from QLayout..SH "void QGridLayout::addItem ( QLayoutItem * item, int row, int col )"Adds \fIitem\fR at position \fIrow, col.\fR The layout takes over ownership of \fIitem.\fR.SH "void QGridLayout::addLayout ( QLayout * layout, int row, int col )"Places another layout at position (\fIrow, col)\fR in the grid. The top left position is (0,0)..SH "void QGridLayout::addMultiCell ( QLayoutItem * item, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )"Adds the \fIitem\fR to the cell grid, spanning multiple rows/columns..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..SH "void QGridLayout::addMultiCellLayout ( QLayout * layout, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )"Adds the layout \fIw\fR to the cell grid, spanning multiple rows/columns..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..PPA non-zero alignment indicates that the layout should not grow to fill the available space, but should be sized according to sizeHint()..SH "void QGridLayout::addMultiCellWidget ( QWidget * w, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )"Adds the widget \fIw\fR to the cell grid, spanning multiple rows/columns..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..PPA non-zero alignment indicates that the widget should not grow to fill the available space, but should be sized according to sizeHint()..PPExamples:.(lcursor/cursor.cpp layout/layout.cpp.)l.SH "void QGridLayout::addRowSpacing ( int row, int minsize )"Sets the minimum height of \fIrow\fR to \fIminsize\fR pixels..SH "void QGridLayout::addWidget ( QWidget * w, int row, int col, int alignment = 0 )"Adds the widget \fIw\fR to the cell grid at \fIrow, col.\fR The top left position is (0,0).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..PPNote 1: You should not call this if you have enabled the auto-add facility of the layout..PPNote 2: 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()..PPExamples:.(lcursor/cursor.cpp layout/layout.cpp rot13/rot13.cpp.)l.SH "QRect QGridLayout::cellGeometry ( int row, int col ) const"Returns the geometry of the cell with row \fIrow,\fR and column \fIcol\fR in the grid. Returns an invalid rectangle if \fIrow\fR or \fIcol\fR is outside the grid..PP\fBWarning:\fR in the current version of Qt, this function does not return valid results until setGeometry() has been called, ie. after the mainWidget() is visible..SH "int QGridLayout::colStretch ( int col ) const"Returns the stretch factor for column \fIcol.\fR.PPSee also setColStretch()..SH "void QGridLayout::expand ( int nRows, int nCols )"Expands this grid so that it will have \fInRows\fR rows and \fInCols\fR columns. Will not shrink the grid. You should not need to call this function, as QGridLayout expands automatically as new items are inserted..SH "QSizePolicy::ExpandData QGridLayout::expanding() const \fC[virtual]\fR"Returns the expansiveness of this layout..PPReimplemented from QLayoutItem..SH "bool QGridLayout::findWidget ( QWidget * w, int * row, int * col ) \fC[protected]\fR"Searches for \fIw\fR in this layout (not including child layouts). If \fIw\fR is found, it sets \fIrow\fR and \fIcol\fR to the row and column and returns TRUE. If \fIw\fR is not found, FALSE is returned..PP\fBWarning:\fR If a widget spans multiple rows/columns, the top-left cell is returned..SH "bool QGridLayout::hasHeightForWidth () const \fC[virtual]\fR"Returns whether this layout's preferred height depends on its width..PPReimplemented from QLayoutItem..SH "int QGridLayout::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 QGridLayout::invalidate () \fC[virtual]\fR"Resets cached information..PPReimplemented from QLayoutItem..SH "QLayoutIterator QGridLayout::iterator () \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QLayoutItem..SH "QSize QGridLayout::maximumSize () const \fC[virtual]\fR"Returns the maximum size needed by this grid..PPReimplemented from QLayoutItem..SH "QSize QGridLayout::minimumSize () const \fC[virtual]\fR"Returns the minimum size needed by this grid..PPReimplemented from QLayoutItem..SH "int QGridLayout::numCols () const"Returns the number of columns in this grid..SH "int QGridLayout::numRows () const"Returns the number of rows in this grid..SH "int QGridLayout::rowStretch ( int row ) const"Returns the stretch factor for row \fIrow.\fR.PPSee also setRowStretch()..SH "void QGridLayout::setColStretch ( int col, int stretch ) \fC[virtual]\fR"Sets the stretch factor of column \fIcol\fR to \fIstretch.\fR The first column is number 0..PPThe stretch factor is relative to the other columns in this grid. Columns with higher stretch factor take more of the available space..PPThe default stretch factor is 0. If the stretch factor is 0 and no other column in this table can grow at all, the column may still grow..PPSee also colStretch(), addColSpacing() and setRowStretch()..PPExamples:.(llayout/layout.cpp.)l.SH "void QGridLayout::setGeometry ( const QRect & r ) \fC[virtual]\fR"Resizes managed widgets within the rectangle \fIr.\fR.PPReimplemented from QLayoutItem..SH "void QGridLayout::setOrigin ( Corner c )"Sets which of the four corners of the grid corresponds to (0,0)..SH "void QGridLayout::setRowStretch ( int row, int stretch ) \fC[virtual]\fR"Sets the stretch factor of row \fIrow\fR to \fIstretch.\fR The first row is number 0..PPThe stretch factor is relative to the other rows in this grid. Rows with higher stretch factor take more of the available space..PPThe default stretch factor is 0. If the stretch factor is 0 and no other row in this table can grow at all, the row may still grow..PPSee also rowStretch(), addRowSpacing() and setColStretch()..SH "QSize QGridLayout::sizeHint () const \fC[virtual]\fR"Returns the preferred size of this grid..PPReimplemented from QLayoutItem..SH "SEE ALSO".BR http://doc.trolltech.com/qgridlayout.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 make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qgridlayout.3qt) and the Qtversion (2.3.10).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -