Requiring KApplication because of installX11EventFilter (was Re: KModifierKeyInfo moved to kdereview)

Wang Hoi zealot.hoi at gmail.com
Wed Apr 29 04:21:56 BST 2009


I've encountered the similar problem when writing x11 event filter.
I use QAbstractEventDispatcher to came across it.
bool myEventFilter(void *message)
{
       XEvent *event = static_cast<XEvent *>(message);
       // ....
}
QAbstractEventDispatcher::instance()->setEventFilter(myEventFilter) ....

I asked on #qt, and somebody told me that QAbstractEventDispather can
do more than QApplication(KApplication), it can filter any messages
sent to the app's window, even that window not created by Qt,
QApplication can only filter event sent to Qt created Window




More information about the kde-core-devel mailing list