[Interest] Keep screen active on desktop

Alexander Dyagilev alervdvcw at gmail.com
Sun Dec 29 16:31:38 CET 2019


Hello,

Under Windows, you should use SetThreadExecutionState instead.

On 12/29/2019 5:41 PM, Kevin André wrote:
> 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
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list