KSystemEventFilter Namespace Reference
from PyKDE4.kdeui.KSystemEventFilter import *
Detailed Description
Members of this namespace allow installing and removing global event-filters that will catch all window system events the application receives.
Functions | |
installEventFilter (QWidget filter) | |
removeEventFilter (QWidget filter) |
Function Documentation
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.
removeEventFilter | ( | QWidget | filter | |
) |
Removes a global widget filter.