Class: QgsLayerTreeViewIndicator

class qgis.gui.QgsLayerTreeViewIndicator(parent: QObject = None)

Bases: PyQt5.QtCore.QObject

Constructs an indicator, optionally transferring ownership to a parent QObject

Indicator that can be used in a layer tree view to display icons next to items of the layer tree. They add extra context to the item and interactivity (using clicked() signal).

Indicators can be added/removed to individual layer tree items using QgsLayerTreeView.addIndicator() and QgsLayerTreeView.removeIndicator() calls.

New in version 3.2.

Parameters

parent

childEvent()
clicked

Signal that is emitted when user clicks on the indicator [signal]

connectNotify()
customEvent()
disconnectNotify()
icon(self) → QIcon

Indicator icon that will be displayed in the layer tree view

Return type

QIcon

isSignalConnected()
receivers()
sender()
senderSignalIndex()
setIcon(self, icon: QIcon)

Sets indicator icon that will be displayed in the layer tree view

Parameters

icon (QIcon) –

setToolTip(self, tip: str)

Sets tool tip text

Parameters

tip (str) –

timerEvent()
toolTip(self) → str

Returns tool tip text that will be shown when user hovers mouse over the indicator

Return type

str