Class: QgsMapLayerStyleOverride

class qgis.core.QgsMapLayerStyleOverride(layer: QgsMapLayer)

Bases: sip.wrapper

Construct a style override object associated with a map layer. The overridden style will be restored upon object destruction.

QgsMapLayerStyleOverride(QgsMapLayerStyleOverride)

Restore overridden layer style on destruction.

New in version 3.2: Enums

Methods

setOverrideStyle Temporarily apply a different style to the layer.

Signals

Attributes

setOverrideStyle(self, style: str)

Temporarily apply a different style to the layer. The argument can be either a style name or a full QML style definition.