Class: QgsLabelingEngineRulesWidget

A widget which allows configuration of a list of labeling engine rules.

This widget allows users to add, remove, and edit the properties of a list of QgsAbstractLabelingEngineRule objects.

See also

QgsLabelingEngineRuleWidget for a widget for configuring a single rule

Added in version 3.40.

QgsLabelingEngineRulesWidget

QgsLabelingEngineRulesWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsLabelingEngineRulesWidget

Base classes

QgsPanelWidget

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

QWidget

QObject

QPaintDevice

Methods

rules

Returns the rules shown in the widget.

setRules

Sets the rules to show in the widget.

Signals

changed

Emitted when the rules configured in the widget are changed.

class qgis.gui.QgsLabelingEngineRulesWidget[source]

Bases: QgsPanelWidget

__init__(parent: QWidget | None = None)

Constructor for QgsLabelingEngineRulesWidget.

Parameters:

parent (Optional[QWidget] = None)

signal changed[source]

Emitted when the rules configured in the widget are changed.

rules(self) List[QgsAbstractLabelingEngineRule]

Returns the rules shown in the widget.

The caller takes ownership of all returned rules.

Return type:

List[QgsAbstractLabelingEngineRule]

setRules(self, rules: Iterable[QgsAbstractLabelingEngineRule])[source]

Sets the rules to show in the widget.

Ownership is not transferred, an internal copy will be made.

Parameters:

rules (Iterable[QgsAbstractLabelingEngineRule])