Greetings!
I have encountered a very strange problem during shutdown, while the application was still runing.
The QApplication instance won't exit from the main event loop when the pc shuts down.
A proper way to exit from the event loop is a must in my case, because otherwise the post process routines won't be called.
So I have created an event filter and installid it using
QApplication::setEventFiler( EventFilter filter), and I was able to catch the WM_QUERYENDSESSION and WM_ENDSESSION events, and tried to exit from the event loop there using
QApplication::quit() and QApplication::exit() functions, but neither of them worked. So I tried to delete the qApp instance, but that way the application won't terminate regularly either.
It seems to be a bug in Qt. I'm using version 4.4.3. under WinXP and VS2008.
Have anyone found a workaround to this problem?



Reply With Quote

to that we can add why are all testers not developers but dumb-minded jerkatrons!! anyhoo, discussion on that would require a couple of beers..so moving on..a bold suggestion if u will..why dont u add logging information inside QCoreApplication::exit(int)..it has a loop where its exiting from all event loops..log that information..then u can get a clear picture of whats happening..cuz if that function exits properly, all events are destined to have exited.

Bookmarks