aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicklabel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquicklabel.cpp')
-rw-r--r--src/quicktemplates2/qquicklabel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicklabel.cpp b/src/quicktemplates2/qquicklabel.cpp
index 9937436c..71b60a2b 100644
--- a/src/quicktemplates2/qquicklabel.cpp
+++ b/src/quicktemplates2/qquicklabel.cpp
@@ -405,7 +405,7 @@ void QQuickLabel::setBackground(QQuickItem *background)
}
QQuickControlPrivate::removeImplicitSizeListener(d->background, d, QQuickControlPrivate::ImplicitSizeChanges | QQuickItemPrivate::Geometry);
- delete d->background;
+ QQuickControlPrivate::hideOldItem(d->background);
d->background = background;
if (background) {