Class: QgsSearchWidgetToolButton¶
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.
Class Hierarchy¶
Base classes¶
Methods
Returns the active filter flags shown in the widget. |
|
Returns the available filter flags shown in the widget. |
|
Returns |
|
Sets the search widget as active by selecting the first available search type. |
|
Sets the current active filter flags for the widget. |
|
Sets the available filter flags to show in the widget. |
|
Sets the default filter flags to show in the widget. |
|
Sets the search widget as inactive, ie do not search the corresponding field. |
|
Toggles an individual active filter flag for the widget. |
Signals
Emitted when the active flags selected in the widget is changed |
- class qgis.gui.QgsSearchWidgetToolButton[source]¶
Bases:
QToolButton- __init__(parent: QWidget | None = None)
Constructor for QgsSearchWidgetToolButton.
- Parameters:
parent (Optional[QWidget] = None) – parent object
- activeFlags(self) QgsSearchWidgetWrapper.FilterFlags[source]¶
Returns the active filter flags shown in the widget.
See also
See also
See also
- Return type:
- signal activeFlagsChanged(flags: QgsSearchWidgetWrapper.FilterFlags)[source]¶
Emitted when the active flags selected in the widget is changed
- Parameters:
flags (QgsSearchWidgetWrapper.FilterFlags) – active flags
- availableFlags(self) QgsSearchWidgetWrapper.FilterFlags[source]¶
Returns the available filter flags shown in the widget.
See also
See also
- Return type:
- isActive(self) bool[source]¶
Returns
Trueif the widget is set to be included in the search.See also
See also
- Return type:
bool
- setActive(self)[source]¶
Sets the search widget as active by selecting the first available search type.
See also
See also
- setActiveFlags(self, flags: QgsSearchWidgetWrapper.FilterFlags | QgsSearchWidgetWrapper.FilterFlag)[source]¶
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 (Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag]) – active flags to show in widget
See also
See also
See also
- setAvailableFlags(self, flags: QgsSearchWidgetWrapper.FilterFlags | QgsSearchWidgetWrapper.FilterFlag)[source]¶
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 (Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag]) – available flags to show in widget
See also
See also
See also
- setDefaultFlags(self, flags: QgsSearchWidgetWrapper.FilterFlags | QgsSearchWidgetWrapper.FilterFlag)[source]¶
Sets the default filter flags to show in the widget.
- Parameters:
flags (Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag]) – default flags to show in widget
See also
See also
- setInactive(self)[source]¶
Sets the search widget as inactive, ie do not search the corresponding field.
See also
See also
- toggleFlag(self, flag: QgsSearchWidgetWrapper.FilterFlag)[source]¶
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 (QgsSearchWidgetWrapper.FilterFlag) – flag to toggle
See also
See also