Class: QgsLegendFilterButton

class qgis.gui.QgsLegendFilterButton(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QToolButton

Construct a new filter legend button

Parameters

parent (QWidget = None) – The parent QWidget

A tool button that allows enabling or disabling legend filter by contents of the map. An additional pop down menu allows defining a boolean expression to refine the filtering.

actionEvent()
changeEvent()
checkStateSet()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
expressionText(self) → str

Returns the current text used as filter expression

Return type

str

expressionTextChanged

Emitted when the expression text changes [signal]

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
hitButton()
initPainter()
initStyleOption()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
nextCheckState()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setExpressionText(self, expression: str)

Sets the current text used as filter expression. This will update the menu

Parameters

expression (str) –

setVectorLayer(self, layer: QgsVectorLayer)

Sets the associated vectorLayer May be None

Parameters

layer (QgsVectorLayer) –

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
vectorLayer(self) → QgsVectorLayer

Returns the current associated vectorLayer May be None

Return type

QgsVectorLayer

wheelEvent()