[Qt-interest] Detecting operating system shutdown

Paul Miller paul at fxtech.com
Thu Jul 16 18:38:09 CEST 2009


Bob Hood wrote:
> I have a tasktray application, and I'd like to be able to detect the 
> shutdown state of the operating system.  In wxWidgets, for example, this 
> takes the shape of a wxCloseEvent that cannot be vetoed.  How is this 
> accomplished with Qt?

I took a peek in the Windows shutdown code in 4.5.2 and all it does is 
terminate the app. I think you'll have to override the windows event 
handler in QApplication and look for WM_QUERYENDSESSION and 
WM_ENDSESSION messages.

-- 
Paul Miller | paul at fxtech.com | www.fxtech.com | Got Tivo?




More information about the Qt-interest-old mailing list