Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Getting current active window
Pradeep NS last edited by
I am planning to get the current active window from my application.
when the application is run, that window will be the active window of the application. Once the application is minimized, and after some time old window will be deleted and new window will be shown, but that time the active window was pointing to the deleted window, then my application crashes when i access the active window.
Is there any way i update the active window to the current window that has been shown/appeared once the application is minimized.
Please suggest a solution
JonB last edited by
Depends whether you are keeping your own track of what the active window is, or using Qt calls. But in any case, when you "after some time old window will be deleted and new window will be shown", which you say is happening while minimized, simply make sure you move the active window when you delete the current one, if that is necessary.