summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/examples/transitions/qml/Transitions/main.qml11
-rw-r--r--doc/src/qtquick/qtquick-app-tutorial.qdoc14
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/examples/transitions/qml/Transitions/main.qml b/doc/examples/transitions/qml/Transitions/main.qml
index e1c8e2748f..20e8c4f190 100644
--- a/doc/examples/transitions/qml/Transitions/main.qml
+++ b/doc/examples/transitions/qml/Transitions/main.qml
@@ -1,3 +1,9 @@
+//! [2]
+
+//! [1]
+
+//! [0]
+
import QtQuick 1.0
Rectangle {
@@ -32,6 +38,7 @@ Rectangle {
onClicked: page.state = ' '
}
}
+//! [0]
Rectangle {
id: middleRightRect
@@ -71,6 +78,8 @@ Rectangle {
}
}
+//! [1]
+
states: [
State {
name: "State1"
@@ -116,3 +125,5 @@ Rectangle {
}
]
}
+
+//! [2]
diff --git a/doc/src/qtquick/qtquick-app-tutorial.qdoc b/doc/src/qtquick/qtquick-app-tutorial.qdoc
index 1087839842..36ea3c832c 100644
--- a/doc/src/qtquick/qtquick-app-tutorial.qdoc
+++ b/doc/src/qtquick/qtquick-app-tutorial.qdoc
@@ -205,6 +205,10 @@
\endlist
+ The qml.main file should now look as follows:
+
+ \snippet examples/transitions/qml/Transitions/main.qml 0
+
\o In the \gui Navigator pane, copy topLeftRect (by pressing
\key {Ctrl+C}) and paste it to the canvas twice (by pressing
\key {Ctrl+V}). \QC renames the new instances of the element
@@ -253,6 +257,10 @@
You will create State2 later.
+ The qml.main file should now look as follows:
+
+ \snippet examples/transitions/qml/Transitions/main.qml 1
+
\endlist
\o Press \key {Ctrl+S} to save the changes.
@@ -348,4 +356,10 @@
Click the rectangles to view the animated transitions.
+ \section1 Example Code
+
+ When you have completed the steps, the main.qml file should look as follows:
+
+ \snippet examples/transitions/qml/Transitions/main.qml 2
+
*/