Hi,
I'm inserting a hook in the MFC message loop so that the Qt events are treated, without running ->exec() on qApp (because it's blocking):
LRESULT CALLBACK myHookFn(int ncode, WPARAM wparam, LPARAM lparam) {
if (qApp) qApp->sendPostedEvents();
return CallNextHookEx(0, ncode, wparam, lparam);
}
and
int argc = 0;
new QApplication(argc, NULL);
SetWindowsHookEx(WH_GETMESSAGE, myHookFn, 0, threadId);
My question is:
What are the mechanisms equivalent to the MFC hook insertion that can be used under MacOSX so that sendPostedEvents could also be called?