[Interest] Keep screen active on desktop

Kevin André hyperquantum at gmail.com
Sun Dec 29 15:41:18 CET 2019


Hi,

I'm developing a FOSS music player (using Qt Widgets), and when I run
it on my company laptop, after about 15 minutes of user inactivity
(not touching the keyboard or mouse) the screen turns off and the
Windows session is locked. But I've checked the screensaver setting,
and screensaver is disabled. So I'm guessing that this is a security
measure configured by my employer using Group Policy. But other
programs like VLC don't seem to suffer from this problem, so they must
have some mechanism for preventing this.

I did some searching, and I know that on Windows, for example,
periodic calls to SendInput() can be used to simulate user activity
and prevent screensaver activation. But I would like to avoid having
to write platform specific code.

Does Qt provide some platform-independent way to keep the screen
active? Or do I need to submit an enhancement request?


Thanks,

Kevin


More information about the Interest mailing list