Class: QgsPropertyAssistantWidget¶
Shows a user-friendly assistant guiding users through the creation of
QgsProperty overrides.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an 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
parentwidget, the constructor accepts a corresponding propertydefinitionfrom which it customizes the displayed options (eg a color based property definition will show an assistant to allow creation of color based properties). TheinitialStatedictates the initial state to show in the widget. A correspondinglayercan 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
propertyin place to corresponding to the current settings shown in the widget.- Parameters:
property (QgsProperty)