Class: QgsTreeWidgetItemObject

Custom QgsTreeWidgetItem with extra signals when the item is edited.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsTreeWidgetItemObject

Base classes

QObject

QgsTreeWidgetItem

QTreeWidgetItem subclass with custom handling for item sorting.

QTreeWidgetItem

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsTreeWidgetItemObject. See the FAQ for more details.

setData

Sets the value for the item's column and role to the given value.

Signals

itemEdited

Emitted when the contents of the column in the specified item has been edited by the user.

class qgis.gui.QgsTreeWidgetItemObject[source]

Bases: QObject, QgsTreeWidgetItem

__init__(type: int = QTreeWidgetItem.Type)

Constructor for QgsTreeWidgetItemObject

Parameters:

type (int = QTreeWidgetItem.Type) – item type

__init__(parent: QTreeWidget | None, type: int = QTreeWidgetItem.Type)

Constructs a tree widget item of the specified type and appends it to the items in the given parent.

Parameters:
  • parent (Optional[QTreeWidget])

  • type (int = QTreeWidgetItem.Type)

signal itemEdited(item: QTreeWidgetItem, column: int)[source]

Emitted when the contents of the column in the specified item has been edited by the user.

Parameters:
  • item (QTreeWidgetItem)

  • column (int)

virtual setData(self, column: int, role: int, value: Any)[source]

Sets the value for the item’s column and role to the given value.

Parameters:
  • column (int)

  • role (int)

  • value (Any)