Class: QgsSearchWidgetToolButton

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

Bases: PyQt5.QtWidgets.QToolButton

Constructor for QgsSearchWidgetToolButton.

Parameters:parent – parent object

A tool button widget which is displayed next to search widgets in forms, and allows for controlling how the widget behaves and how the filtering/searching operates.

New in version 2.16: Methods

actionEvent
activeFlags Returns the active filter flags shown in the widget.
availableFlags Returns the available filter flags shown in the widget.
changeEvent
checkStateSet
childEvent
closeEvent
connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
hideEvent
hitButton
initPainter
initStyleOption
inputMethodEvent
isActive Returns true if the widget is set to be included in the search.
isSignalConnected
keyPressEvent
keyReleaseEvent
leaveEvent
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
nextCheckState
paintEvent
receivers
resizeEvent
sender
senderSignalIndex
setActive Sets the search widget as active by selecting the first available search type.
setActiveFlags Sets the current active filter flags for the widget.
setAvailableFlags Sets the available filter flags to show in the widget.
setDefaultFlags Sets the default filter flags to show in the widget.
setInactive Sets the search widget as inactive, ie do not search the corresponding field.
sharedPainter
showEvent
tabletEvent
timerEvent
toggleFlag Toggles an individual active filter flag for the widget.
updateMicroFocus
wheelEvent

Signals

activeFlagsChanged Emitted when the active flags selected in the widget is changed

Attributes

actionEvent()
activeFlags(self) → QgsSearchWidgetWrapper.FilterFlags

Returns the active filter flags shown in the widget.

See also

setActiveFlags()

See also

toggleFlag()

See also

availableFlags()

activeFlagsChanged

Emitted when the active flags selected in the widget is changed

Parameters:flags – active flags [signal]
availableFlags(self) → QgsSearchWidgetWrapper.FilterFlags

Returns the available filter flags shown in the widget.

See also

activeFlags()

changeEvent()
checkStateSet()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
hitButton()
initPainter()
initStyleOption()
inputMethodEvent()
isActive(self) → bool

Returns true if the widget is set to be included in the search.

See also

setInactive()

See also

setActive()

isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
nextCheckState()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setActive(self)

Sets the search widget as active by selecting the first available search type.

See also

isActive()

See also

setInactive()

setActiveFlags(self, flags: Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag])

Sets the current active filter flags for the widget. Any flags which are not present in the available filter flags (see availableFlags()) will not be set.

Parameters:flags – active flags to show in widget

See also

toggleFlag()

See also

activeFlags()

setAvailableFlags(self, flags: Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag])

Sets the available filter flags to show in the widget. Any active flags (see activeFlags()) which are not present in the new available filter flags will be cleared;

Parameters:flags – available flags to show in widget

See also

availableFlags()

See also

setActiveFlags()

setDefaultFlags(self, flags: Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag])

Sets the default filter flags to show in the widget.

Parameters:flags – default flags to show in widget

See also

setActiveFlags()

setInactive(self)

Sets the search widget as inactive, ie do not search the corresponding field.

See also

isActive()

See also

setActive()

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
toggleFlag(self, flag: QgsSearchWidgetWrapper.FilterFlag)

Toggles an individual active filter flag for the widget. Any flags which are not present in the available filter flags (see availableFlags()) will be ignore. Other flags may be cleared if they conflict with the newly toggled flag.

Parameters:flag – flag to toggle

See also

setActiveFlags()

See also

activeFlags()

updateMicroFocus()
wheelEvent()