Class: QgsTreeWidgetItemObject

class qgis.gui.QgsTreeWidgetItemObject

Bases: PyQt5.QtCore.QObject, QgsTreeWidgetItem

Custom QgsTreeWidgetItem with extra signals when item is edited.

New in version 3.0.

QgsTreeWidgetItemObject(type: int = QTreeWidgetItem.Type) Constructor for QgsTreeWidgetItemObject

Parameters

type – item type

QgsTreeWidgetItemObject(parent: QTreeWidget, type: int = QTreeWidgetItem.Type) Constructs a tree widget item of the specified type and appends it to the items in the given parent.

Methods

childEvent

connectNotify

customEvent

disconnectNotify

emitDataChanged

isSignalConnected

receivers

sender

senderSignalIndex

setData

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

timerEvent

Signals

itemEdited

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
emitDataChanged(self)
isSignalConnected(self, QMetaMethod) bool
itemEdited

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type

PYQT_SIGNAL

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
setData(self, column: int, role: int, value: Any)

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

Parameters
  • column (int) –

  • role (int) –

  • value (Any) –

timerEvent(self, QTimerEvent)