Catching system shutdown



  • Our app puts up a warning dialog when you close the main window, telling the user it is minimizing to the system tray. But I don't want to do this if the window is getting closed because the system is being shutdown. How can I catch the shutdown and not put up the warning? Unfortunately, there doesn't seem to be a system shutdown signal. I looked at QSession, but nothing jumps out.



  • If the user is closing the session, you should be able to do what's described in here.

    http://doc.qt.nokia.com/4.7/session.html



  • Yeah, I ended up creating a QApplication-derived class and setting a flag in commitData. It seems an odd way to do something so basic as catch system shutdown, but if it works..,


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.