diff --git a/src/widgets/ViewSplitter.cpp b/src/widgets/ViewSplitter.cpp index f1986ab0..773fb3cb 100644 --- a/src/widgets/ViewSplitter.cpp +++ b/src/widgets/ViewSplitter.cpp @@ -137,6 +137,10 @@ void ViewSplitter::childEvent(QChildEvent *event) if (event->removed()) { if (count() == 0) { + auto *parent_splitter = qobject_cast(parentWidget()); + if (parent_splitter != nullptr) { + setParent(nullptr); + } deleteLater(); } if (findChild() == nullptr) {