aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickcontainer.cpp')
-rw-r--r--src/quicktemplates2/qquickcontainer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp
index 19b59e33..f38c2b09 100644
--- a/src/quicktemplates2/qquickcontainer.cpp
+++ b/src/quicktemplates2/qquickcontainer.cpp
@@ -219,7 +219,7 @@ void QQuickContainerPrivate::cleanup()
QQuickWindowPrivate::get(window)->clearFocusInScope(contentItem, focusItem, Qt::OtherFocusReason);
q->contentItemChange(nullptr, contentItem);
- delete contentItem;
+ QQuickControlPrivate::hideOldItem(contentItem);
}
QObject::disconnect(contentModel, &QQmlObjectModel::countChanged, q, &QQuickContainer::countChanged);