KDEUI
Functions | |
void | installEventFilter (QWidget *filter) |
void | removeEventFilter (const QWidget *filter) |
Detailed Description
Members of this namespace allow installing and removing global event-filters that will catch all window system events the application receives.
Function Documentation
void KSystemEventFilter::installEventFilter | ( | QWidget * | filter | ) |
Installs a widget filter as a global X11 event filter.
The widget filter receives all events in its standard x11Event(), winEvent(), qwsEvent() and macEvent() event handler functions. When the filter widget is destroyed, it is automatically removed from the list of known filters. Each filter widget can be added (and will be called) only once. The function doesn't transfer the widget filter's ownership, so the code installing the event filter is responsible for freeing it if it's no longer needed.
- Parameters
-
filter the filter widget to install
- Remarks
- The order in which installed event filters are called is arbitrary. Processing the events will stop as soon as a filter "consumes" an event (ie. the *Event() method returns true). Also note that the result parameter of the widget filter' winEvent() method will be discarded.
- Warning
- Only do this when absolutely necessary. An installed event filter can slow things down.
Definition at line 146 of file ksystemeventfilter.cpp.
void KSystemEventFilter::removeEventFilter | ( | const QWidget * | filter | ) |
Removes a global widget filter.
Definition at line 153 of file ksystemeventfilter.cpp.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.