Class: QgsSimpleLegendNode

class qgis.core.QgsSimpleLegendNode

Bases: QgsLayerTreeModelLegendNode

Implementation of legend node interface for displaying arbitrary label with icon.

New in version 2.6.

QgsSimpleLegendNode(nodeLayer: QgsLayerTreeLayer, label: str, icon: QIcon = QIcon(), parent: QObject = None, key: str = ‘’) Constructor for QgsSimpleLegendNode.

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
createTemporaryRenderContext(self) QgsRenderContext

Returns a temporary context or None if legendMapViewData are not valid

customEvent(self, QEvent)
data(self, role: int) Any

role (int) –

Return type:


disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) bool
receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)