Class: QgsActionWidgetWrapper

Wraps a button widget to launch a layer action.

Added in version 3.22.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsActionWidgetWrapper

Base classes

QgsWidgetWrapper

Manages an editor widget Widget and wrapper share the same parent

QObject

Methods

setAction

Sets the action.

class qgis.gui.QgsActionWidgetWrapper[source]

Bases: QgsWidgetWrapper

__init__(layer: QgsVectorLayer | None, editor: QWidget | None, parent: QWidget | None)

Create an action widget wrapper

Parameters:
  • layer (Optional[QgsVectorLayer]) – The layer on which the feature is.

  • editor (Optional[QWidget]) – An editor widget. Can be None if one should be autogenerated.

  • parent (Optional[QWidget]) – A parent widget

setAction(self, action: QgsAction)[source]

Sets the action.

Parameters:

action (QgsAction)