Is there any way to log when program returns control back to the main event loop?
Is there any way to log when program returns control back to the main event loop?
You can reimplement QCoreApplication::notify() which is a method called for every event dispatch in your application. An alternative is to install an event filter on the application object which gives you a similar possibility just without subclassing.
I guess every message should have at least some kind of an id. Is there any way to get message's id from message argument on Windows?typedef QCoreApplication::EventFilter
A function with the following signature that can be used as an event filter:
bool myEventFilter(void *message, long *result);
This is for Windows events... If you want Qt events, use QObject::installEventFilter() and QObject::eventFilter().
A full implementation would require reimplementing QAbstractEventDispatcher::processEvents() but I assume you wouldn't like to do that thus it's best to track event dispatching as suggested.
Bookmarks