开发者

Qt - how to detect what application is in focus

开发者 https://www.devze.com 2022-12-21 05:16 出处:网络
Is it possible to know what applicatio开发者_运维技巧n is in focus using Qt ?I\'m not sure about other apps, but you can tell whether your own application has the focus or not by checking for a 0 resu

Is it possible to know what applicatio开发者_运维技巧n is in focus using Qt ?


I'm not sure about other apps, but you can tell whether your own application has the focus or not by checking for a 0 result from QApplication::activeWindow.


You'll need to use some Win32 API functions. Mainly GetActiveWindow(). Search MSDN for the function.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号