Reputation: 31
I want to catch all events for the application. How can i use this method to achive this? Please help me !!
Upvotes: 3
Views: 3560
Reputation: 6295
QCoreApplication inherits QObject, so you can call QCoreApplication::installEventFilter(QObject*). For further reference about event filters, see here.
Upvotes: 2
Reputation: 1303
You have to implement and provide a function and point to it.
For example:
bool myEventFilter(void *message, long *result)
{
// do something with message and result
}
And call it like this:
app->setEventFilter( myEventFilter );
Upvotes: 1