diff options
author | Leena Miettinen <riitta-leena.miettinen@nokia.com> | 2011-11-16 10:32:37 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@nokia.com> | 2011-11-16 13:21:12 +0100 |
commit | 803c012e622c9fd52278212997799be6d2aba6d6 (patch) | |
tree | a4bc067866e4f3c9675b90c56df1aab2ff3b8b16 | |
parent | b41237f01ef626381d8519f0703e54a4551f6c36 (diff) | |
download | qt-creator-803c012e622c9fd52278212997799be6d2aba6d6.tar.gz |
Doc: add example code to the tutorial
Task-number: QTCREATORBUG-6540
Change-Id: I4b5f7e73ee49e03621a9461d037e13c251959e84
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
-rw-r--r-- | doc/examples/transitions/qml/Transitions/main.qml | 11 | ||||
-rw-r--r-- | doc/src/qtquick/qtquick-app-tutorial.qdoc | 14 |
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 + */ |