[Qt-interest] having Qt-based application notified on system standby/hibernate events

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Wed Feb 23 01:19:27 CET 2011


Hi Crni, 

Have a look at QCoreApplication::winEventFilter and
QApplication::macEventFilter.  Log the messages received during system
shutdown and then analyze the log to see which messages to act on.  

Tony.

> Sent: Wednesday, 23 February 2011 09:54
> 
> On Tue, Feb 22, 2011 at 11:27 PM, Constantin Makshin 
> <cmakshin at gmail.com> wrote:
> > I doubt there's a reliable cross-platform solution for 
> this. For example, on Linux one can use ACPI hook scripts, 
> DE-dependent power management software or something else, and 
> there's no guarantee that applications will be notified when 
> the system changes it power state.
> >
> > It's way too platform-dependent and unreliable, IMHO.
> >
> 
> Thanks for the reply.  Actually, platform-dependent suggestions would
> be helpful too - so if anyone has any kind of suggestion for Windows
> and Mac, that would be great.
> 
> Thanks.




More information about the Qt-interest-old mailing list