Class: QgsAttributeTableDelegate¶
-
class
qgis.gui.
QgsAttributeTableDelegate
(parent: QObject = None)¶ Bases:
PyQt5.QtWidgets.QItemDelegate
Constructor
- Parameters
parent (QObject = None) – parent object
A delegate item class for
QgsAttributeTable
(see Qt documentation for QItemDelegate).Methods
Used to create an editor for when the user tries to change the contents of a cell
Overloads the paint method form the QItemDelegate base class
Sets data from model into the editor.
- param featureSelectionModel
Sets data from editor back to model.
Signals
Emitted when an action column item is painted.
-
actionColumnItemPainted
¶ Emitted when an action column item is painted. The consumer of this signal can initialize the index widget.
Note
This signal is emitted repeatedly whenever the item is being painted. It is the consumers responsibility to check if initialization has already happened before. [signal]
- Parameters
index (QModelIndex) –
-
childEvent
(self, QChildEvent)¶
-
connectNotify
(self, QMetaMethod)¶
-
createEditor
(self, parent: QWidget, option: QStyleOptionViewItem, index: QModelIndex) → QWidget¶ Used to create an editor for when the user tries to change the contents of a cell
- Parameters
parent (QWidget) –
option (QStyleOptionViewItem) –
index (QModelIndex) –
- Return type
QWidget
-
customEvent
(self, QEvent)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
drawBackground
(self, QPainter, QStyleOptionViewItem, QModelIndex)¶
-
drawCheck
(self, QPainter, QStyleOptionViewItem, QRect, Qt.CheckState)¶
-
drawDecoration
(self, QPainter, QStyleOptionViewItem, QRect, QPixmap)¶
-
drawDisplay
(self, QPainter, QStyleOptionViewItem, QRect, str)¶
-
drawFocus
(self, QPainter, QStyleOptionViewItem, QRect)¶
-
editorEvent
(self, QEvent, QAbstractItemModel, QStyleOptionViewItem, QModelIndex) → bool¶
-
eventFilter
(self, QObject, QEvent) → bool¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
paint
(self, painter: QPainter, option: QStyleOptionViewItem, index: QModelIndex)¶ Overloads the paint method form the QItemDelegate base class
- Parameters
painter (QPainter) –
option (QStyleOptionViewItem) –
index (QModelIndex) –
-
receivers
(self, PYQT_SIGNAL) → int¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setEditorData
(self, editor: QWidget, index: QModelIndex)¶ Sets data from model into the editor. Overloads default method
- Parameters
editor (QWidget) – editor which was created by create editor function in this class
index (QModelIndex) – index of field which is to be retrieved
-
setFeatureSelectionModel
(self, featureSelectionModel: QgsFeatureSelectionModel)¶ - Parameters
featureSelectionModel (QgsFeatureSelectionModel) –
-
setModelData
(self, editor: QWidget, model: QAbstractItemModel, index: QModelIndex)¶ Sets data from editor back to model. Overloads default method
- Parameters
editor (QWidget) – editor which was created by create editor function in this class
model (QAbstractItemModel) – model where data should be updated
index (QModelIndex) – index of field which is to be modified
-
timerEvent
(self, QTimerEvent)¶