tags:

views:

68

answers:

2

Is it possible to know what application is in focus using Qt ?

+2  A: 

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.

Andrew
A: 

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

KillerWabbit