Class: QgsTableWidgetItem

class qgis.gui.QgsTableWidgetItem

Bases: PyQt5.QtWidgets.QTableWidgetItem

Constructor for QgsTableWidgetItem.

QgsTableWidgetItem(text: str) Creates a new table widget item with the specified text.

QgsTableWidgetItem(QgsTableWidgetItem)

This can be used like a regular QTableWidgetItem with the difference that a specific role can be set to sort.

Enums

Methods

setSortRole Set the role by which the items should be sorted.
sortRole Gets the role by which the items should be sorted.

Signals

Attributes

setSortRole(self, role: int)

Set the role by which the items should be sorted. By default this will be set to Qt.DisplayRole

sortRole(self) → int

Gets the role by which the items should be sorted. By default this will be Qt.DisplayRole