From 2178b52621ed16f9846d6f80ecb59706b9d31921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Meyer?= <86659038+AndreMeyerRMC@users.noreply.github.com> Date: Thu, 24 Aug 2023 11:20:32 +0200 Subject: [PATCH] Delete implicit ScrollArea when content Widget is deleted in hideDockWidget() (#551) --- src/DockWidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DockWidget.cpp b/src/DockWidget.cpp index 60cbff0..86c96d9 100644 --- a/src/DockWidget.cpp +++ b/src/DockWidget.cpp @@ -213,6 +213,12 @@ void DockWidgetPrivate::hideDockWidget() if (Features.testFlag(CDockWidget::DeleteContentOnClose)) { + if (ScrollArea) + { + ScrollArea->takeWidget(); + delete ScrollArea; + ScrollArea = nullptr; + } Widget->deleteLater(); Widget = nullptr; }