QTableWidgetSelectionRange

The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model. More

Inheritance diagram of PySide6.QtWidgets.QTableWidgetSelectionRange

Synopsis

Functions

Detailed Description

The QTableWidgetSelectionRange class stores the top left and bottom right rows and columns of a selection range in a table. The selections in the table may consist of several selection ranges.

Note

If the item within the selection range is marked as not selectable, e.g., itemFlags() & Qt::ItemIsSelectable == 0 then it will not appear in the selection range.

See also

QTableWidget

class PySide6.QtWidgets.QTableWidgetSelectionRange

PySide6.QtWidgets.QTableWidgetSelectionRange(QTableWidgetSelectionRange)

PySide6.QtWidgets.QTableWidgetSelectionRange(top, left, bottom, right)

Parameters

Constructs an empty table selection range, i.e. a range whose rowCount() and columnCount() are 0.

Constructs the table selection range from the given top, left, bottom and right table rows and columns.

PySide6.QtWidgets.QTableWidgetSelectionRange.bottomRow()
Return type

int

Returns the bottom row of the range.

PySide6.QtWidgets.QTableWidgetSelectionRange.columnCount()
Return type

int

Returns the number of columns in the range.

This is equivalent to rightColumn() - leftColumn() + 1.

PySide6.QtWidgets.QTableWidgetSelectionRange.leftColumn()
Return type

int

Returns the left column of the range.

PySide6.QtWidgets.QTableWidgetSelectionRange.rightColumn()
Return type

int

Returns the right column of the range.

PySide6.QtWidgets.QTableWidgetSelectionRange.rowCount()
Return type

int

Returns the number of rows in the range.

This is equivalent to bottomRow() - topRow() + 1.

PySide6.QtWidgets.QTableWidgetSelectionRange.topRow()
Return type

int

Returns the top row of the range.