- class qgis.gui.QgsFocusWatcher(parent: QObject)¶
Constructor for QgsFocusWatcher.
parent – parent widget to catch focus events for. This class will automatically be installed as an event filter for parent.
A event filter for watching for focus events on a parent object. Usually QObjects must subclass and override methods like focusOutEvent to handle focus events. Using this class as an event filter avoids the need to subclass objects and the focus events can be directly caught using the emitted signals.
New in version 2.16:
- param obj
Emitted when parent object's focus changes.
Emitted when parent object gains focus.
Emitted when parent object loses focus.
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- eventFilter(self, obj: QObject, event: QEvent) bool ¶
obj (QObject) –
event (QEvent) –
- Return type
Emitted when parent object’s focus changes.
focused (bool) –
Trueif object gained focus,
Falseif object lost focus [signal]
Emitted when parent object gains focus. [signal]
Emitted when parent object loses focus. [signal]
- isSignalConnected(self, QMetaMethod) bool ¶
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶