diff --git a/src/plugins/private/expolayout.cpp b/src/plugins/private/expolayout.cpp index 0d008c8bab..52e8bd6616 100644 --- a/src/plugins/private/expolayout.cpp +++ b/src/plugins/private/expolayout.cpp @@ -100,8 +100,14 @@ void ExpoCell::setContentItem(QQuickItem *item) return; } + if (m_contentItem) { + disconnect(m_contentItem, &QQuickItem::parentChanged, this, &ExpoCell::updateContentItemGeometry); + } + m_contentItem = item; + connect(m_contentItem, &QQuickItem::parentChanged, this, &ExpoCell::updateContentItemGeometry); + if (m_contentItem) { m_contentItem->setVisible(isVisible()); }