From effc0d4c73d11e15d5c4f556cf8b64a6423064a8 Mon Sep 17 00:00:00 2001 From: Ruben Manuel Thoms Date: Mon, 21 Sep 2020 14:40:42 +0200 Subject: [PATCH] It appears that the QMdiSubWindow's 'Qt::WA_DeleteOnClose' attribute is not having any effect anymore when the application's style sheet was changed. This leaves us with dangling sub windows after the main windows were closed. In order to make sure these sub windows are closed anyways, the sub windows are now explicitly deleted in 'RiuMainWindowBase::removeViewerFromMdiArea'. --- ApplicationCode/UserInterface/RiuMainWindowBase.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ApplicationCode/UserInterface/RiuMainWindowBase.cpp b/ApplicationCode/UserInterface/RiuMainWindowBase.cpp index 9e100bf32a..bad9f34984 100644 --- a/ApplicationCode/UserInterface/RiuMainWindowBase.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindowBase.cpp @@ -293,6 +293,8 @@ void RiuMainWindowBase::removeViewerFromMdiArea( QMdiArea* mdiArea, QWidget* vie } mdiArea->removeSubWindow( subWindowBeingClosed ); + delete subWindowBeingClosed; + QList subWindowList = mdiArea->subWindowList( QMdiArea::ActivationHistoryOrder ); if ( !subWindowList.empty() ) {