PDA

View Full Version : WM_INPUT not being filtered by winEventFilter()



been_1990
10th October 2010, 14:37
So, using winEventFilter() I get lots of messages from Windows, but none are WM_INPUT.
Is there something I am missing? Or does QApplication not support raw input?

EDIT:
Apparently I have to use QAbstractEventDispatcher().
I tried doing this:

QAbstractEventDispatcher::instance()->setEventFilter(eventFiltering);
bool QApp::eventFiltering(void *msg)
{
qDebug() << msg;
return false;
}
But I get this message:

no matching function for call to 'QAbstractEventDispatcher::setEventFilter(<unresolved overloaded function type>)'
note: candidates are: bool (* QAbstractEventDispatcher::setEventFilter(bool (*)(void*)))(void*)

Update:
So going here (http://www.qtforum.org/article/22530/passing-methode-to-qabstracteventdispatcher-seteventfilter.html) I was able to make the above work.
But I still do not get a WM_INPUT message.

been_1990
12th October 2010, 03:19
Anyone knows why qwidget does not receive raw input message?