Way to catch non-QApplication window events ?

  • Is there a way to catch other application window event like when a window get activated or lose focus ?

    I want to create an app that act only if a certain application is running and currently active.

  • Qt Champions 2017

    which platform ? what do you mean by currently active ? Do you want to check only if the another application is running ?

  • @dheerendra

    Ultimately i would have liked it to be cross-platform, but if not possible, windows is my main target.

    Now what i want is to catch an eventual event that is triggered when a window (which is not part of the qt app) get and lose focus (activated ?, foreground ?).

    While we are at it, i want to be able to create a qt window that would appear on top of the window target, but if i do that the other window will lose focus and then trigger my event, so i need to be able to manage this "conflict".

  • Qt Champions 2017

    No direct way to do this in Qt. You need to write this on your own.

Log in to reply