开发者

Qt - how to detect what application is in focus

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜