Class: QgsFieldItem

class qgis.core.QgsFieldItem(parent: QgsDataItem, field: QgsField)

Bases: QgsDataItem

Constructor for QgsFieldItem, with the specified parent item and field.


parent item must be a QgsFieldsItem

A layer field item, information about the connection URI, the schema and the table as well as the layer instance the field belongs to can be retrieved from the parent QgsFieldsItem object.

New in version 3.16.

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deferredDelete(self) → bool

The item is scheduled to be deleted. E.g. if deleteLater() is called when item is in Populating state (createChildren() running in another thread), the deferredDelete() returns True and item will be deleted once Populating finished. Items with slow reateChildren() (for example network or database based) may check during createChildren() if deferredDelete() returns True and return from createChildren() immediately because result will be useless.

disconnectNotify(self, QMetaMethod)
icon(self) → QIcon
Return type


isSignalConnected(self, QMetaMethod) → bool
populate(self, children: object)

populate(self, foreground: bool = False)

receivers(self, PYQT_SIGNAL) → int
refresh(self, children: object)

Refresh the items from a specified list of child items.


sender(self) → QObject
senderSignalIndex(self) → int
timerEvent(self, QTimerEvent)

Will request a repaint of this icon.

New in version 3.0.