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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user