View Single Post
Posts: 118 | Thanked: 45 times | Joined on Dec 2009 @ Germany
#1
Hi,

I have an app which refreshs the output to the screen every 0.1seconds. But if the screen is turned of this is not necessary. Therefor I would like to "listen" to DBus for a sort of blanking message and reenabling screen message to reduce CPU time of my app. The only problem is, I've not yet figured out (nor was able to google it) how to do that.

I'm using Qt and C++.

I would think that I receive some signal from dbus which I can connect to a slot where I do all my necessary handling upon "application minimize" or "application restore". But what signals will I receive, which signals will tell me that the screen is off or on now, how to include/use QDBus etc...?

Can anyone give me an example how to do that? Or is there a Qt C++ program which is doing that and therefor I could use as an example?

Last edited by emesem; 2010-08-15 at 19:11.