Delete implicit ScrollArea when content Widget is deleted in hideDockWidget() (#551)

This commit is contained in:
André Meyer 2023-08-24 11:20:32 +02:00 committed by GitHub
parent 61573cba16
commit 2178b52621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,6 +213,12 @@ void DockWidgetPrivate::hideDockWidget()
if (Features.testFlag(CDockWidget::DeleteContentOnClose))
{
if (ScrollArea)
{
ScrollArea->takeWidget();
delete ScrollArea;
ScrollArea = nullptr;
}
Widget->deleteLater();
Widget = nullptr;
}