summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index dd685d4..bd3c1ea 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -1533,8 +1533,12 @@ void QmlGraphicsItem::setParentItem(QmlGraphicsItem *parent)
QmlGraphicsItem *oldParent = parentItem();
if (parent == oldParent || !parent) return;
+ Q_D(QmlGraphicsItem);
QObject::setParent(parent);
- QGraphicsObject::setParentItem(parent);
+ d->setParentItemHelper(parent, /*newParentVariant=*/0, /*thisPointerVariant=*/0);
+ if (oldParent)
+ emit oldParent->childrenChanged();
+ emit parentChanged();
}
/*!