aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickstackview_p.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-15 16:04:44 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-18 09:54:00 +0000
commit05933f155e0f0e90fb609839688e01b05d8e80ae (patch)
tree8d5ba0a819a4b3686d3ed12397e1faec2a5bf292 /src/quicktemplates2/qquickstackview_p.cpp
parente9becf6931e9ff12b8912ddb79e4b2cbdd2d530a (diff)
QQuickStackView: claim QObject ownership for dynamically created items
Change-Id: I08030cab226c3e1f602e922fa1cad0a260e0c0ad Task-number: QTBUG-54552 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p.cpp')
-rw-r--r--src/quicktemplates2/qquickstackview_p.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickstackview_p.cpp b/src/quicktemplates2/qquickstackview_p.cpp
index 809f7386..c1b68652 100644
--- a/src/quicktemplates2/qquickstackview_p.cpp
+++ b/src/quicktemplates2/qquickstackview_p.cpp
@@ -160,6 +160,7 @@ void QQuickStackElement::incubate(QObject *object)
item = qmlobject_cast<QQuickItem *>(object);
if (item) {
QQmlEngine::setObjectOwnership(item, QQmlEngine::CppOwnership);
+ item->setParent(view);
initialize();
}
}