aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml')
-rw-r--r--src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml
new file mode 100644
index 0000000000..ec4db1c2de
--- /dev/null
+++ b/src/quickcontrols/doc/snippets/qtquickcontrols-stackview-custom.qml
@@ -0,0 +1,29 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+//! [file]
+import QtQuick
+import QtQuick.Controls
+
+StackView {
+ id: control
+
+ popEnter: Transition {
+ XAnimator {
+ from: (control.mirrored ? -1 : 1) * -control.width
+ to: 0
+ duration: 400
+ easing.type: Easing.OutCubic
+ }
+ }
+
+ popExit: Transition {
+ XAnimator {
+ from: 0
+ to: (control.mirrored ? -1 : 1) * control.width
+ duration: 400
+ easing.type: Easing.OutCubic
+ }
+ }
+}
+//! [file]