简体   繁体   English

使用Qt判断PC是否退出待机状态

[英]Tell if PC comes out of standby using Qt

Is there a cross platform way, using Qt, to tell if a computer has come out of standby or hibernation. 是否有使用Qt的跨平台方法来判断计算机是否已退出待机或休眠状态。

I need to be able to detect when the computer has come out of standby in order to reset/continue a process. 我需要能够检测计算机何时退出待机状态,以便重置/继续一个过程。 In this case it is a connection to a GPS via serial port. 在这种情况下,它是通过串行端口连接到GPS的。

Based on the discussion at http://comments.gmane.org/gmane.comp.lib.qt.general/39649 it seems that there is no reliable cross-platform way of doing this. 根据http://comments.gmane.org/gmane.comp.lib.qt.general/39649上的讨论,似乎没有可靠的跨平台方法。 The linked discussion provides some instructions on how to do this on windows and mac by listening to platform signaling. 链接的讨论提供了有关如何通过侦听平台信号在Windows和Mac上执行此操作的说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM