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?
Bookmarks