Class: QgsSubstitutionListWidget

A widget which allows users to specify a list of substitutions to apply to a string, with options for exporting and importing substitution lists.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsSubstitutionListWidget

Base classes

QgsPanelWidget

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

QWidget

QObject

QPaintDevice

Methods

setSubstitutions

Sets the list of substitutions to show in the widget.

substitutions

Returns the list of substitutions currently defined by the widget.

Signals

substitutionsChanged

Emitted when the substitution definitions change.

class qgis.gui.QgsSubstitutionListWidget[source]

Bases: QgsPanelWidget

__init__(parent: QWidget | None = None)

Constructor for QgsSubstitutionListWidget.

Parameters:

parent (Optional[QWidget] = None) – parent widget

setSubstitutions(self, substitutions: QgsStringReplacementCollection)[source]

Sets the list of substitutions to show in the widget.

Parameters:

substitutions (QgsStringReplacementCollection) – substitution list

See also

substitutions()

substitutions(self) QgsStringReplacementCollection[source]

Returns the list of substitutions currently defined by the widget.

Return type:

QgsStringReplacementCollection

signal substitutionsChanged(substitutions: QgsStringReplacementCollection)[source]

Emitted when the substitution definitions change.

Parameters:

substitutions (QgsStringReplacementCollection)