Class: QgsAttributeEditorAction

class qgis.core.QgsAttributeEditorAction

Bases: QgsAttributeEditorElement

This element will load a layer action onto the form.

New in version 3.22.

QgsAttributeEditorAction(action: QgsAction, parent: 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: 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(QgsAttributeEditorAction)

Methods

action

Returns the (possibly lazy loaded) action for the given layer.

clone

param parent

setAction

Set the action to newAction.

action(self, layer: QgsVectorLayer) QgsAction

Returns the (possibly lazy loaded) action for the given layer.

Parameters

layer (QgsVectorLayer) –

Return type

QgsAction

clone(self, parent: QgsAttributeEditorElement) QgsAttributeEditorElement
Parameters

parent (QgsAttributeEditorElement) –

Return type

QgsAttributeEditorElement

setAction(self, newAction: QgsAction)

Set the action to newAction.

Parameters

newAction (QgsAction) –