[Qt-interest] No POSIX Signals in Windows; How To Capture Program Termination
William Gordon Rutherdale (rutherw)
rutherw at cisco.com
Tue Nov 23 20:35:39 CET 2010
> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Andreas Pakulat
> On 23.11.10 12:45:39, William Gordon Rutherdale (rutherw) wrote:
> > . . .
> > My question: How can I write Qt code that detects imminent shutdown
> in
> > a similar fashion in Windows?
>
> You can't, or rather Qt doesn't provide any abstraction for this. Your
> only option is to look into Windows native API and find out what
option
> you have for such cases.
Thanks for the clear answer.
I guess I can work around it by periodically dumping statistics using a
QTimer.
Thanks also to John and Ben for their ideas: print after app->exec()
terminates, or use the aboutToQuit() slot. Unfortunately, neither seems
to work. The program just terminates real fast.
-Will
More information about the Qt-interest-old
mailing list