Ben.Hines
20th February 2006, 15:23
Hello,
I would like to be able to determine if my Qt application is the 'current' application. E.g. on Windows XP and MacOS, there is one application that is considered to be the 'current' one. I thought that detecting events with type equal to QEvent::ApplicationActivated or QEvent::ApplicationDeactivated would be the correct way to detect this change. I overrode QApplication::event(QEvent *e) and put in cases for the two types mentioned above, but these two events do not seem to be received (at least on Windows XP). Does anyone know how to detect that the application has become active or inactive?
Thanks,
Ben
I would like to be able to determine if my Qt application is the 'current' application. E.g. on Windows XP and MacOS, there is one application that is considered to be the 'current' one. I thought that detecting events with type equal to QEvent::ApplicationActivated or QEvent::ApplicationDeactivated would be the correct way to detect this change. I overrode QApplication::event(QEvent *e) and put in cases for the two types mentioned above, but these two events do not seem to be received (at least on Windows XP). Does anyone know how to detect that the application has become active or inactive?
Thanks,
Ben