aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickstackview.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-08-26 12:46:42 +0200
committerMitch Curtis <mitch.curtis@qt.io>2016-09-02 08:23:49 +0000
commit58326f2bc3bceafc0054e790832e0a77db340606 (patch)
tree596cd37c11aab8077980e7e6db9f65e200e1bf82 /src/quicktemplates2/qquickstackview.cpp
parent67f67f2cc6de160ddea4aa76afc56e86415ed99b (diff)
StackView: add removed() attached signal
This provides an opportunity for users to destroy items that StackView doesn't, like objects that are pushed as Items. [ChangeLog][Controls][StackView] Added StackView.removed() attached signal to provide a way to delete items that StackView won't. Task-number: QTBUG-55405 Change-Id: I59096efaf1a95d36451fbf1f46b8f68ee96c20de Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickstackview.cpp')
-rw-r--r--src/quicktemplates2/qquickstackview.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index df163089..040eff1b 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -1092,4 +1092,21 @@ QQuickStackView::Status QQuickStackAttached::status() const
\sa status
*/
+/*!
+ \qmlattachedsignal QtQuick.Controls::StackView::removed()
+ \since QtQuick.Controls 2.1
+
+ This attached signal is emitted when the item it's attached to has been
+ removed from the stack. It can be used to safely destroy an Item that was
+ pushed onto the stack, for example:
+
+ \code
+ Item {
+ StackView.onRemoved: destroy() // Will be destroyed sometime after this call.
+ }
+ \endcode
+
+ \sa status
+*/
+
QT_END_NAMESPACE