Class: QgsAttributeEditorAction

This element will load a layer action onto the form.

Added in version 3.22.

Class Hierarchy

Inheritance diagram of qgis.core.QgsAttributeEditorAction

Base classes

QgsAttributeEditorElement

An abstract base class for any elements of a drag and drop form.

Methods

action

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

setAction

Set the action to newAction.

class qgis.core.QgsAttributeEditorAction[source]

Bases: QgsAttributeEditorElement

__init__(action: QgsAction, parent: QgsAttributeEditorElement | None)

Creates a new element which can display a layer action.

Parameters:
__init__(uuid: QUuid, parent: QgsAttributeEditorElement | None)

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 (QUuid) – The action unique identifier (UUID).

  • parent (Optional[QgsAttributeEditorElement]) – The parent (used as container).

__init__(a0: QgsAttributeEditorAction)
Parameters:

a0 (QgsAttributeEditorAction)

action(self, layer: QgsVectorLayer | None) QgsAction

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

Parameters:

layer (Optional[QgsVectorLayer])

Return type:

QgsAction

setAction(self, newAction: QgsAction)[source]

Set the action to newAction.

Parameters:

newAction (QgsAction)