aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/examples/tutorial.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/examples/tutorial.qdoc')
-rw-r--r--doc/src/examples/tutorial.qdoc32
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/src/examples/tutorial.qdoc b/doc/src/examples/tutorial.qdoc
index 9042b5e3d8..d8d6e14f09 100644
--- a/doc/src/examples/tutorial.qdoc
+++ b/doc/src/examples/tutorial.qdoc
@@ -46,9 +46,9 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria
Tutorial chapters:
\list 1
-\o \l {QML Tutorial 1 - Basic Types}{Basic Types}
-\o \l {QML Tutorial 2 - QML Components}{QML Components}
-\o \l {QML Tutorial 3 - States and Transitions}{States and Transitions}
+\li \l {QML Tutorial 1 - Basic Types}{Basic Types}
+\li \l {QML Tutorial 2 - QML Components}{QML Components}
+\li \l {QML Tutorial 3 - States and Transitions}{States and Transitions}
\endlist
*/
@@ -97,7 +97,7 @@ We add a \l Text element as a child of the root Rectangle element that displays
The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
The \c anchors.horizontalCenter property refers to the horizontal center of an element.
-In this case, we specify that our text element should be horizontally centered in the \i page element (see \l{anchor-layout}{Anchor-Based Layout}).
+In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-Based Layout}).
The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
@@ -141,24 +141,24 @@ Here is the QML code for \c Cell.qml:
\snippet examples/declarative/tutorials/helloworld/Cell.qml 1
-The root element of our component is an \l Item with the \c id \i container.
+The root element of our component is an \l Item with the \c id \e container.
An \l Item is the most basic visual element in QML and is often used as a container for other elements.
\snippet examples/declarative/tutorials/helloworld/Cell.qml 4
-We declare a \c cellColor property. This property is accessible from \i outside our component, this allows us
+We declare a \c cellColor property. This property is accessible from \e outside our component, this allows us
to instantiate the cells with different colors.
This property is just an alias to an existing property - the color of the rectangle that compose the cell
(see \l{Property Binding in QML}).
\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
-We want our component to also have a signal that we call \i clicked with a \i cellColor parameter of type \i color.
+We want our component to also have a signal that we call \e clicked with a \e cellColor parameter of type \e color.
We will use this signal to change the color of the text in the main QML file later.
\snippet examples/declarative/tutorials/helloworld/Cell.qml 2
-Our cell component is basically a colored rectangle with the \c id \i rectangle.
+Our cell component is basically a colored rectangle with the \c id \e rectangle.
The \c anchors.fill property is a convenient way to set the size of an element.
In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-Based Layout}).
@@ -168,8 +168,8 @@ In this case the rectangle will have the same size as its parent (see \l{anchor-
In order to change the color of the text when clicking on a cell, we create a \l MouseArea element with
the same size as its parent.
-A \l MouseArea defines a signal called \i clicked.
-When this signal is triggered we want to emit our own \i clicked signal with the color as parameter.
+A \l MouseArea defines a signal called \e clicked.
+When this signal is triggered we want to emit our own \e clicked signal with the color as parameter.
\section2 The main QML file
@@ -181,8 +181,8 @@ We create the color picker by putting 6 cells with different colors in a grid.
\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 1
-When the \i clicked signal of our cell is triggered, we want to set the color of the text to the \i cellColor passed as a parameter.
-We can react to any signal of our component through a property of the name \i 'onSignalName' (see \l{Signal Handlers}).
+When the \e clicked signal of our cell is triggered, we want to set the color of the text to the \e cellColor passed as a parameter.
+We can react to any signal of our component through a property of the name \e 'onSignalName' (see \l{Signal Handlers}).
*/
/*!
@@ -206,10 +206,10 @@ Here is the QML code:
\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2
-First, we create a new \i down state for our text element.
+First, we create a new \e down state for our text element.
This state will be activated when the \l MouseArea is pressed, and deactivated when it is released.
-The \i down state includes a set of property changes from our implicit \i {default state}
+The \e down state includes a set of property changes from our implicit \e {default state}
(the items as they were initially defined in the QML).
Specifically, we set the \c y property of the text to \c 160, the rotation to \c 180 and the \c color to red.
@@ -219,9 +219,9 @@ Because we don't want the text to appear at the bottom instantly but rather move
we add a transition between our two states.
\c from and \c to define the states between which the transition will run.
-In this case, we want a transition from the default state to our \i down state.
+In this case, we want a transition from the default state to our \li down state.
-Because we want the same transition to be run in reverse when changing back from the \i down state to the default state,
+Because we want the same transition to be run in reverse when changing back from the \e down state to the default state,
we set \c reversible to \c true.
This is equivalent to writing the two transitions separately.