Class: QgsAttributeEditorAction¶
- class qgis.core.QgsAttributeEditorAction¶
Bases:
QgsAttributeEditorElement
This element will load a layer action onto the form.
Added in version 3.22.
QgsAttributeEditorAction(action:
QgsAction
, parent: Optional[QgsAttributeEditorElement]) Creates a new element which can display a layer action.- Parameters:
action – The action
parent – The parent (used as container)
QgsAttributeEditorAction(uuid: QUuid, parent: Optional[QgsAttributeEditorElement]) Creates a new element which can display a layer action, this constructor allows to create a
QgsAttributeEditorAction
when actions are not yet loaded.- Parameters:
uuid – The action unique identifier (UUID).
parent – The parent (used as container).
QgsAttributeEditorAction(a0:
QgsAttributeEditorAction
)- action(self, layer: QgsVectorLayer | None) QgsAction ¶
Returns the (possibly lazy loaded) action for the given
layer
.- Parameters:
layer (Optional[QgsVectorLayer])
- Return type:
- clone(self, parent: QgsAttributeEditorElement | None) QgsAttributeEditorElement | None ¶
- Parameters:
parent (Optional[QgsAttributeEditorElement])
- Return type:
Optional[QgsAttributeEditorElement]