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; }