Class: QgsPropertyAssistantWidget

Shows a user-friendly assistant guiding users through the creation of QgsProperty overrides.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsPropertyAssistantWidget

Base classes

QgsPanelWidget

Base class for any widget that can be shown as a inline panel

QWidget

QObject

QPaintDevice

Methods

registerExpressionContextGenerator

Register an expression context generator class that will be used to retrieve an expression context for the button when required.

updateProperty

Updates a property in place to corresponding to the current settings shown in the widget.

class qgis.gui.QgsPropertyAssistantWidget[source]

Bases: QgsPanelWidget

__init__(parent: QWidget | None = None, definition: QgsPropertyDefinition = QgsPropertyDefinition(), initialState: QgsProperty = QgsProperty(), layer: QgsVectorLayer | None = None)

Constructor for QgsPropertyAssistantWidget. Aside from a parent widget, the constructor accepts a corresponding property definition from which it customizes the displayed options (eg a color based property definition will show an assistant to allow creation of color based properties). The initialState dictates the initial state to show in the widget. A corresponding layer can also be set to allow population of GUI widgets such as field selectors.

Parameters:
registerExpressionContextGenerator(self, generator: QgsExpressionContextGenerator | None)[source]

Register an expression context generator class that will be used to retrieve an expression context for the button when required.

Parameters:

generator (Optional[QgsExpressionContextGenerator])

updateProperty(self, property: QgsProperty)[source]

Updates a property in place to corresponding to the current settings shown in the widget.

Parameters:

property (QgsProperty)