Subgroup: Table

Class: QgsTableWidgetItem

class qgis.gui.QgsTableWidgetItem

Bases: PyQt5.QtWidgets.QTableWidgetItem

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

Methods

background
checkState
clone
column
data
flags
font
foreground
icon
isSelected
read
row
setBackground
setCheckState
setData
setFlags
setFont
setForeground
setIcon
setSelected
setSizeHint
setSortRole Set the role by which the items should be sorted.
setStatusTip
setText
setTextAlignment
setToolTip
setWhatsThis
sizeHint
sortRole Get the role by which the items should be sorted.
statusTip
tableWidget
text
textAlignment
toolTip
type
whatsThis
write

Attributes

Type
UserType
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

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