diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index 26e28ebef2..90bbf22ad4 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -413,7 +413,7 @@ void QQuickControlPrivate::setContentItem_helper(QQuickItem *item, bool notify) delete oldContentItem; if (item) { - connect(contentItem, &QQuickItem::baselineOffsetChanged, this, &QQuickControlPrivate::updateBaselineOffset); + connect(contentItem.data(), &QQuickItem::baselineOffsetChanged, this, &QQuickControlPrivate::updateBaselineOffset); if (!item->parentItem()) item->setParentItem(q); if (componentComplete)