Obsolete Members for QGridLayout

The following members of class QGridLayout are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(obsolete) QGridLayout(QWidget * parent, int nRows, int nCols = 1, int margin = 0, int space = -1, const char * name = 0)
(obsolete) QGridLayout(int nRows, int nCols = 1, int spacing = -1, const char * name = 0)
(obsolete) QGridLayout(QLayout * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0)
(obsolete) void expand(int nRows, int nCols)

Member Function Documentation

QGridLayout::QGridLayout(QWidget * parent, int nRows, int nCols = 1, int margin = 0, int space = -1, const char * name = 0)

Constructs a new QGridLayout with nRows rows, nCols columns and parent widget, parent. parent may not be 0. The grid layout is called name.

margin is the number of pixels between the edge of the widget and its managed children. space is the default number of pixels between cells. If space is -1, the value of margin is used.

QGridLayout::QGridLayout(int nRows, int nCols = 1, int spacing = -1, const char * name = 0)

Constructs a new grid with nRows rows and nCols columns. If spacing is -1, this QGridLayout inherits its parent's spacing(); otherwise spacing is used. The grid layout is called name.

You must insert this grid into another layout. You can insert widgets and layouts into this layout at any time, but laying out will not be performed before this is inserted into another layout.

QGridLayout::QGridLayout(QLayout * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0)

Constructs a new grid with nRows rows and nCols columns. If spacing is -1, this QGridLayout inherits its parent's spacing(); otherwise spacing is used. The grid layout is called name.

You must insert this grid into another layout. You can insert widgets and layouts into this layout at any time, but laying out will not be performed before this is inserted into another layout.

void QGridLayout::expand(int nRows, int nCols)

Expands this grid so that it will have nRows rows and nCols columns. Will not shrink the grid. You should not need to call this function because QGridLayout expands automatically as new items are inserted.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.