From a438e7ae14f8b711a77996a934cd4b0aa284b26b Mon Sep 17 00:00:00 2001 From: AndreMeyerRMC Date: Fri, 18 Aug 2023 10:04:29 +0200 Subject: [PATCH] Delete implicit ScrollArea when content Widget is deleted in hideDockWidget() --- 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; }