Skip to content

PythonQt.QtGui.QTableView · declarations 002

Back to PythonQt.QtGui.QTableView

selectRow

selectRow(row: int) -> None

X.selectRow(row)

Supplemental documentation: Qt 5 reference:

[slot] void QTableView::selectRow(int row)

Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.

See also selectColumn().

Upstream PySide2 reference signatures (binding differences may apply):

selectRow(self, row: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#selectRow

selectedIndexes

selectedIndexes() -> tuple

X.selectedIndexes() -> tuple

Supplemental documentation: Qt 5 reference:

[override virtual protected] QModelIndexList QTableView::selectedIndexes() const

Reimplements: QAbstractItemView::selectedIndexes() const.

Upstream PySide2 reference signatures (binding differences may apply):

selectedIndexes(self) -> typing.List[int]

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#selectedIndexes

setColumnHidden

setColumnHidden(column: int, hide: bool) -> None

X.setColumnHidden(column, hide)

Supplemental documentation: Qt 5 reference:

void QTableView::setColumnHidden(int column, bool hide)

If hide is true the given column will be hidden; otherwise it will be shown.

See also isColumnHidden() and setRowHidden().

Upstream PySide2 reference signatures (binding differences may apply):

setColumnHidden(self, column: int, hide: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setColumnHidden

setColumnWidth

setColumnWidth(column: int, width: int) -> None

X.setColumnWidth(column, width)

Supplemental documentation: Qt 5 reference:

void QTableView::setColumnWidth(int column, int width)

Sets the width of the given column to be width.

This function was introduced in Qt 4.1.

See also columnWidth().

Upstream PySide2 reference signatures (binding differences may apply):

setColumnWidth(self, column: int, width: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setColumnWidth

setCornerButtonEnabled

setCornerButtonEnabled(enable: bool) -> None

X.setCornerButtonEnabled(enable)

Upstream PySide2 reference signatures (binding differences may apply):

setCornerButtonEnabled(self, enable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setCornerButtonEnabled

setGridStyle

setGridStyle(style: Any) -> None

X.setGridStyle(style)

Upstream PySide2 reference signatures (binding differences may apply):

setGridStyle(self, style: PySide2.QtCore.Qt.PenStyle) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setGridStyle

setHorizontalHeader

setHorizontalHeader(header: Any) -> None

X.setHorizontalHeader(header)

Supplemental documentation: Qt 5 reference:

void QTableView::setHorizontalHeader(QHeaderView *header)

Sets the widget to use for the horizontal header to header.

See also horizontalHeader() and setVerticalHeader().

Upstream PySide2 reference signatures (binding differences may apply):

setHorizontalHeader(self, header: PySide2.QtWidgets.QHeaderView) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setHorizontalHeader

setModel

setModel(model: Any) -> None

X.setModel(model)

Supplemental documentation: Qt 5 reference:

[override virtual] void QTableView::setModel(QAbstractItemModel *model)

Reimplements: QAbstractItemView::setModel(QAbstractItemModel *model).

Upstream PySide2 reference signatures (binding differences may apply):

setModel(self, model: PySide2.QtCore.QAbstractItemModel) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setModel

setRootIndex

setRootIndex(index: Any) -> None

X.setRootIndex(index)

Supplemental documentation: Qt 5 reference:

[override virtual] void QTableView::setRootIndex(const QModelIndex \&index)

Reimplements: QAbstractItemView::setRootIndex(const QModelIndex \&index).

Upstream PySide2 reference signatures (binding differences may apply):

setRootIndex(self, index: PySide2.QtCore.QModelIndex) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setRootIndex

setRowHeight

setRowHeight(row: int, height: int) -> None

X.setRowHeight(row, height)

Supplemental documentation: Qt 5 reference:

void QTableView::setRowHeight(int row, int height)

Sets the height of the given row to be height.

This function was introduced in Qt 4.1.

See also rowHeight().

Upstream PySide2 reference signatures (binding differences may apply):

setRowHeight(self, row: int, height: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setRowHeight

setRowHidden

setRowHidden(row: int, hide: bool) -> None

X.setRowHidden(row, hide)

Supplemental documentation: Qt 5 reference:

void QTableView::setRowHidden(int row, bool hide)

If hide is true row will be hidden, otherwise it will be shown.

See also isRowHidden() and setColumnHidden().

Upstream PySide2 reference signatures (binding differences may apply):

setRowHidden(self, row: int, hide: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setRowHidden

setSelection

setSelection(rect: Any, command: Any) -> None

X.setSelection(rect, command)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QTableView::setSelection(const QRect \&rect, QItemSelectionModel::SelectionFlags flags)

Reimplements: QAbstractItemView::setSelection(const QRect \&rect, QItemSelectionModel::SelectionFlags flags).

Selects the items within the given rect and in accordance with the specified selection flags.

Upstream PySide2 reference signatures (binding differences may apply):

setSelection(self, rect: PySide2.QtCore.QRect, command: PySide2.QtCore.QItemSelectionModel.SelectionFlags) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setSelection

setSelectionModel

setSelectionModel(selectionModel: Any) -> None

X.setSelectionModel(selectionModel)

Supplemental documentation: Qt 5 reference:

[override virtual] void QTableView::setSelectionModel(QItemSelectionModel *selectionModel)

Reimplements: QAbstractItemView::setSelectionModel(QItemSelectionModel *selectionModel).

Upstream PySide2 reference signatures (binding differences may apply):

setSelectionModel(self, selectionModel: PySide2.QtCore.QItemSelectionModel) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setSelectionModel

setShowGrid

setShowGrid(show: bool) -> None

X.setShowGrid(show)

Upstream PySide2 reference signatures (binding differences may apply):

setShowGrid(self, show: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setShowGrid

setSortingEnabled

setSortingEnabled(enable: bool) -> None

X.setSortingEnabled(enable)

Supplemental documentation: Qt 5 reference:

void QTableView::setSortingEnabled(bool enable)

If enable is true, enables sorting for the table and immediately trigger a call to sortByColumn() with the current sort section and order

Note: Setter function for property sortingEnabled.

See also isSortingEnabled().

Upstream PySide2 reference signatures (binding differences may apply):

setSortingEnabled(self, enable: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setSortingEnabled

setSpan

setSpan(row: int, column: int, rowSpan: int, columnSpan: int) -> None

X.setSpan(row, column, rowSpan, columnSpan)

Supplemental documentation: Qt 5 reference:

void QTableView::setSpan(int row, int column, int rowSpanCount, int columnSpanCount)

Sets the span of the table element at (row, column) to the number of rows and columns specified by (rowSpanCount, columnSpanCount).

This function was introduced in Qt 4.2.

See also rowSpan() and columnSpan().

Upstream PySide2 reference signatures (binding differences may apply):

setSpan(self, row: int, column: int, rowSpan: int, columnSpan: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setSpan

setVerticalHeader

setVerticalHeader(header: Any) -> None

X.setVerticalHeader(header)

Supplemental documentation: Qt 5 reference:

void QTableView::setVerticalHeader(QHeaderView *header)

Sets the widget to use for the vertical header to header.

See also verticalHeader() and setHorizontalHeader().

Upstream PySide2 reference signatures (binding differences may apply):

setVerticalHeader(self, header: PySide2.QtWidgets.QHeaderView) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setVerticalHeader

setWordWrap

setWordWrap(on: bool) -> None

X.setWordWrap(on)

Upstream PySide2 reference signatures (binding differences may apply):

setWordWrap(self, on: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#setWordWrap

showColumn

showColumn(column: int) -> None

X.showColumn(column)

Supplemental documentation: Qt 5 reference:

[slot] void QTableView::showColumn(int column)

Show the given column.

See also hideColumn() and showRow().

Upstream PySide2 reference signatures (binding differences may apply):

showColumn(self, column: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#showColumn

showGrid instance-attribute

showGrid: bool

Qt 5 reference:

showGrid : bool

This property holds whether the grid is shown

If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.

Access functions:

bool showGrid() const
void setShowGrid(bool show)

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#showGrid

showRow

showRow(row: int) -> None

X.showRow(row)

Supplemental documentation: Qt 5 reference:

[slot] void QTableView::showRow(int row)

Show the given row.

See also hideRow() and showColumn().

Upstream PySide2 reference signatures (binding differences may apply):

showRow(self, row: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#showRow

sizeHintForColumn

sizeHintForColumn(column: int) -> int

X.sizeHintForColumn(column) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] int QTableView::sizeHintForColumn(int column) const

Reimplements: QAbstractItemView::sizeHintForColumn(int column) const.

Returns the size hint for the given column's width or -1 if there is no model.

If you need to set the width of a given column to a fixed value, call QHeaderView::resizeSection() on the table's horizontal header.

If you reimplement this function in a subclass, note that the value you return will be used when resizeColumnToContents() or QHeaderView::resizeSections() is called. If a larger column width is required by either the horizontal header or the item delegate, the larger width will be used instead.

See also QWidget::sizeHint, horizontalHeader(), and QHeaderView::resizeContentsPrecision().

Upstream PySide2 reference signatures (binding differences may apply):

sizeHintForColumn(self, column: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#sizeHintForColumn

sizeHintForRow

sizeHintForRow(row: int) -> int

X.sizeHintForRow(row) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] int QTableView::sizeHintForRow(int row) const

Reimplements: QAbstractItemView::sizeHintForRow(int row) const.

Returns the size hint for the given row's height or -1 if there is no model.

If you need to set the height of a given row to a fixed value, call QHeaderView::resizeSection() on the table's vertical header.

If you reimplement this function in a subclass, note that the value you return is only used when resizeRowToContents() is called. In that case, if a larger row height is required by either the vertical header or the item delegate, that width will be used instead.

See also QWidget::sizeHint, verticalHeader(), and QHeaderView::resizeContentsPrecision().

Upstream PySide2 reference signatures (binding differences may apply):

sizeHintForRow(self, row: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#sizeHintForRow

sortByColumn

sortByColumn(column: int, order: Any) -> None

X.sortByColumn(column, order)

Supplemental documentation: Qt 5 reference:

[slot] void QTableView::sortByColumn(int column, Qt::SortOrder order)

Sorts the model by the values in the given column and order.

column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.

This function was introduced in Qt 4.2.

See also sortingEnabled.

Upstream PySide2 reference signatures (binding differences may apply):

sortByColumn(self, column: int) -> None
sortByColumn(self, column: int, order: PySide2.QtCore.Qt.SortOrder) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#sortByColumn

sortingEnabled instance-attribute

sortingEnabled: Any

Qt 5 reference:

sortingEnabled : bool

This property holds whether sorting is enabled

If this property is true, sorting is enabled for the table. If this property is false, sorting is not enabled. The default value is false.

Note: . Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order.

This property was introduced in Qt 4.2.

Access functions:

bool isSortingEnabled() const
void setSortingEnabled(bool enable)

See also sortByColumn().

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#sortingEnabled

timerEvent

timerEvent(event: Any) -> None

X.timerEvent(event)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QTableView::timerEvent(QTimerEvent *event)

Reimplements: QAbstractItemView::timerEvent(QTimerEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

timerEvent(self, event: PySide2.QtCore.QTimerEvent) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#timerEvent

verticalHeader

verticalHeader() -> Any

X.verticalHeader() -> PythonQt.QtGui.QHeaderView

Supplemental documentation: Qt 5 reference:

QHeaderView *QTableView::verticalHeader() const

Returns the table view's vertical header.

See also setVerticalHeader(), horizontalHeader(), and QAbstractItemModel::headerData().

Upstream PySide2 reference signatures (binding differences may apply):

verticalHeader(self) -> PySide2.QtWidgets.QHeaderView

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#verticalHeader

verticalOffset

verticalOffset() -> int

X.verticalOffset() -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] int QTableView::verticalOffset() const

Reimplements: QAbstractItemView::verticalOffset() const.

Returns the vertical offset of the items in the table view.

Note that the table view uses the vertical header section positions to determine the positions of rows in the view.

See also horizontalOffset().

Upstream PySide2 reference signatures (binding differences may apply):

verticalOffset(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#verticalOffset

viewOptions

viewOptions() -> Any

X.viewOptions() -> PythonQt.QtGui.QStyleOptionViewItem

Supplemental documentation: Qt 5 reference:

[override virtual protected] QStyleOptionViewItem QTableView::viewOptions() const

Reimplements: QAbstractItemView::viewOptions() const.

Upstream PySide2 reference signatures (binding differences may apply):

viewOptions(self) -> PySide2.QtWidgets.QStyleOptionViewItem

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#viewOptions

viewportEntered

viewportEntered(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QTableView.viewportEntered; argument details are not documented.

viewportSizeHint

viewportSizeHint() -> Any

X.viewportSizeHint() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

[override virtual protected] QSize QTableView::viewportSizeHint() const

Reimplements: QAbstractItemView::viewportSizeHint() const.

Upstream PySide2 reference signatures (binding differences may apply):

viewportSizeHint(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#viewportSizeHint

visualRect

visualRect(index: Any) -> Any

X.visualRect(index) -> PythonQt.QtCore.QRect

Upstream PySide2 reference signatures (binding differences may apply):

visualRect(self, index: PySide2.QtCore.QModelIndex) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#visualRect

visualRegionForSelection

visualRegionForSelection(selection: Any) -> Any

X.visualRegionForSelection(selection) -> PythonQt.QtGui.QRegion

Upstream PySide2 reference signatures (binding differences may apply):

visualRegionForSelection(self, selection: PySide2.QtCore.QItemSelection) -> PySide2.QtGui.QRegion

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#visualRegionForSelection

windowIconChanged

windowIconChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QTableView.windowIconChanged; argument details are not documented.

windowIconTextChanged

windowIconTextChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QTableView.windowIconTextChanged; argument details are not documented.

windowTitleChanged

windowTitleChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QTableView.windowTitleChanged; argument details are not documented.

wordWrap instance-attribute

wordWrap: bool

Qt 5 reference:

wordWrap : bool

This property holds the item text word-wrapping policy

If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is true by default.

Note that even of wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.

This property was introduced in Qt 4.3.

Access functions:

bool wordWrap() const
void setWordWrap(bool on)

Source: https://doc.qt.io/archives/qt-5.15/qtableview.html#wordWrap