1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #28312 from 0AnshuAditya0:fix/issue-28291-qt-quit-lifecycle

Fix Qt HighGUI lifecycle issue when external QApplication exists
This commit is contained in:
Alexander Smorkalov
2025-12-26 18:29:18 +03:00
committed by GitHub
+9 -6
View File
@@ -854,14 +854,17 @@ GuiReceiver::GuiReceiver() : bTimeOut(false), nb_windows(0)
void GuiReceiver::isLastWindow()
{
if (--nb_windows <= 0)
if (qApp->quitOnLastWindowClosed())
{
delete guiMainThread;//delete global_control_panel too
guiMainThread = NULL;
if (doesExternalQAppExist)
if (--nb_windows <= 0)
{
qApp->quit();
delete guiMainThread; // delete global_control_panel too
guiMainThread = NULL;
if (doesExternalQAppExist)
{
qApp->quit();
}
}
}
}