diff options
Diffstat (limited to 'src/quicktemplates2/qquickstackview_p.cpp')
-rw-r--r-- | src/quicktemplates2/qquickstackview_p.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickstackview_p.cpp b/src/quicktemplates2/qquickstackview_p.cpp index 0f5674c2..438b4269 100644 --- a/src/quicktemplates2/qquickstackview_p.cpp +++ b/src/quicktemplates2/qquickstackview_p.cpp @@ -85,6 +85,7 @@ QQuickStackElement::~QQuickStackElement() if (ownComponent) delete component; + QQuickStackAttached *attached = attachedStackObject(this); if (item) { if (ownItem) { item->setParentItem(nullptr); @@ -99,13 +100,15 @@ QQuickStackElement::~QQuickStackElement() if (item->parentItem() != originalParent) { item->setParentItem(originalParent); } else { - QQuickStackAttached *attached = attachedStackObject(this); if (attached) QQuickStackAttachedPrivate::get(attached)->itemParentChanged(item, nullptr); } } } + if (attached) + emit attached->removed(); + delete context; } |