Class: QgsPropertyAssistantWidget¶
Shows a user-friendly assistant guiding users through the creation of
QgsProperty
overrides.
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as a inline panel |
|
Methods
Register an expression context generator class that will be used to retrieve an expression context for the button when required. |
|
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 propertydefinition
from which it customizes the displayed options (eg a color based property definition will show an assistant to allow creation of color based properties). TheinitialState
dictates the initial state to show in the widget. A correspondinglayer
can also be set to allow population of GUI widgets such as field selectors.- Parameters:
parent (Optional[QWidget] = None)
definition (
QgsPropertyDefinition
= QgsPropertyDefinition())initialState (
QgsProperty
= QgsProperty())layer (Optional[QgsVectorLayer] = None)
- 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)