/*!
\page tutorial1.html
\title Tutorial 1 - Hello World!
\target tutorial1
This first program is a simple "Hello world" example. The picture below is a screenshot of this program.
\image declarative-tutorial1.png
Here is the QML code for the application:
\code
\endcode
\section1 Walkthrough
\section2 Rect element
\code
\endcode
First, we declare a root element of type \l {xmlRect}{Rect}. It is one of the basic building blocks you can use to create an application in QML.
We give it an id to be able to refer to it later. In this case, we call it \e Page. We also set the \c width, \c height and \c color properties.
The \l {xmlRect}{Rect} element contains many other properties (such as \c x and \c y), but these are left at their default values.
\section2 Text element
\code
\endcode
We add a text element as a child of our root element to display the text 'Hello world!'.
The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
The \c font.size and \c font.bold properties are related to fonts and use the 'dot' notation (see \l {declarative}{Declarative UI} ).
The \c anchors.horizontalCenter property refers to the horizontal center of an element. In this case, we bind the center of our text element to the center of the \e Page element. We use braces to indicate that \c Page.horizontalCenter is a bound ECMAScript expression that needs to be evaluated. It also means that if the center of \e Page changes (for example if it is resized) our text will be re-centered automatically (see \l binding).
\section2 Viewing the example
To view what you have created, run the duiviewer (located in the \c bin directory) with your filename as the first argument. For example, to run the provided completed Tutorial 1 example from the install location, you would type:
\code
bin/duiviewer examples/tutorials/t1/tutorial1.qml
\endcode
[\l tutorial] [Next: \l tutorial2]
*/