QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
A event filter for watching for focus events on a parent object. More...
#include <qgsfocuswatcher.h>
Signals | |
void | focusChanged (bool focused) |
Emitted when parent object's focus changes. More... | |
void | focusIn () |
Emitted when parent object gains focus. More... | |
void | focusOut () |
Emitted when parent object loses focus. More... | |
Public Member Functions | |
QgsFocusWatcher (QObject *parent) | |
Constructor for QgsFocusWatcher. More... | |
bool | eventFilter (QObject *obj, QEvent *event) override |
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.
Definition at line 33 of file qgsfocuswatcher.h.
|
explicit |
Constructor for QgsFocusWatcher.
parent | parent widget to catch focus events for. This class will automatically be installed as an event filter for parent. |
Definition at line 19 of file qgsfocuswatcher.cpp.
|
override |
Definition at line 26 of file qgsfocuswatcher.cpp.
|
signal |
Emitted when parent object's focus changes.
focused | true if object gained focus, false if object lost focus |
|
signal |
Emitted when parent object gains focus.
|
signal |
Emitted when parent object loses focus.