Compatibility Members for QGridLayout

The following members of class QGridLayoutare part of the Qt compatibility layer. We advise against using them in new code.

Public Functions

void addColSpacing(int col, int minsize)
void addMultiCell(QLayoutItem * l, int fromRow, int toRow, int fromCol, int toCol, Qt::Alignment align = 0)
void addMultiCellLayout(QLayout * layout, int fromRow, int toRow, int fromCol, int toCol, Qt::Alignment align = 0)
void addMultiCellWidget(QWidget * widget, int fromRow, int toRow, int fromCol, int toCol, Qt::Alignment align = 0)
void addRowSpacing(int row, int minsize)
QRect cellGeometry(int row, int column) const
int colSpacing(int col) const
int colStretch(int col) const
int numCols() const
int numRows() const
Qt::Corner origin() const
int rowSpacing(int row) const
void setColSpacing(int col, int minSize)
void setColStretch(int col, int stretch)
void setOrigin(Qt::Corner corner)
void setRowSpacing(int row, int minSize)
  • 11 public functions inherited from QLayout
  • 8 public functions inherited from QObject

Protected Functions

bool findWidget(QWidget * w, int * row, int * column)
  • 1 protected function inherited from QLayout
  • 1 protected function inherited from QObject

Member Function Documentation

void QGridLayout::addColSpacing(int col, int minsize)

Use addItem(new QSpacerItem(minsize, 0), 0, col) instead.

void QGridLayout::addMultiCell(QLayoutItem * l, int fromRow, int toRow, int fromCol, int toCol, Qt::Alignment align = 0)

Use an addItem() overload that allows you to specify row and column spans instead.

void QGridLayout::addMultiCellLayout(QLayout * layout, int fromRow, int toRow, int fromCol, int toCol, Qt::Alignment align = 0)

Use an addLayout() overload that allows you to specify row and column spans instead.

void QGridLayout::addMultiCellWidget(QWidget * widget, int fromRow, int toRow, int fromCol, int toCol, Qt::Alignment align = 0)

Use an addWidget() overload that allows you to specify row and column spans instead.

void QGridLayout::addRowSpacing(int row, int minsize)

Use addItem(new QSpacerItem(0, minsize), row, 0) instead.

QRect QGridLayout::cellGeometry(int row, int column) const

Use cellRect(row, column) instead.

int QGridLayout::colSpacing(int col) const

Use columnMinimumWidth() instead.

See also setColSpacing().

int QGridLayout::colStretch(int col) const

Use columnStretch() instead.

See also setColStretch().

[protected] bool QGridLayout::findWidget(QWidget * w, int * row, int * column)

Searches for widget w in this layout (not including child layouts). If w is found, it sets *row and *column to the row and column that the widget occupies and returns true; otherwise returns false.

If the widget spans multiple rows/columns, the top-left cell is returned.

Use indexOf() and getItemPosition() instead.

int QGridLayout::numCols() const

Use columnCount() instead.

int QGridLayout::numRows() const

Use rowCount() instead.

Qt::Corner QGridLayout::origin() const

Use originCorner() instead.

See also setOrigin().

int QGridLayout::rowSpacing(int row) const

Use rowMinimumHeight(row) instead.

See also setRowSpacing().

void QGridLayout::setColSpacing(int col, int minSize)

Use setColumnMinimumWidth() instead.

See also colSpacing().

void QGridLayout::setColStretch(int col, int stretch)

Use setColumnStretch() instead.

See also colStretch().

void QGridLayout::setOrigin(Qt::Corner corner)

Use setOriginCorner(corner) instead.

See also origin().

void QGridLayout::setRowSpacing(int row, int minSize)

Use setRowMinimumHeight(row, minSize) instead.

See also rowSpacing().

© 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.