summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/tutorial2.qdoc
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-12 05:00:29 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-12 05:00:29 (GMT)
commit96b87079fa3753cbac2bcbf19b1719f5872c4159 (patch)
tree97761603bf50b9996bc43eb8b9b5b927942987e9 /doc/src/declarative/tutorial2.qdoc
parent84b6eecd133ec9557d507ca290c4ed300aeb8540 (diff)
downloadQt-96b87079fa3753cbac2bcbf19b1719f5872c4159.zip
Qt-96b87079fa3753cbac2bcbf19b1719f5872c4159.tar.gz
Qt-96b87079fa3753cbac2bcbf19b1719f5872c4159.tar.bz2
Fix tutorial.
Diffstat (limited to 'doc/src/declarative/tutorial2.qdoc')
-rw-r--r--doc/src/declarative/tutorial2.qdoc10
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc
index 1535c42..c22a01a 100644
--- a/doc/src/declarative/tutorial2.qdoc
+++ b/doc/src/declarative/tutorial2.qdoc
@@ -13,12 +13,12 @@ Here is the QML code for \c Cell.qml:
\code
Item {
+ property var color
+
id: CellContainer
width: 40
height: 25
- properties: Property {
- name: "color"
- }
+
Rect {
anchors.fill: parent
color: CellContainer.color
@@ -77,9 +77,7 @@ Item {
The root element of our component is an \c Item. It is the most basic 'Fx' element in Qml and is often used as a container for other elements.
\code
-properties: Property {
- name: "color"
-}
+property var color
\endcode
We declare a \c color property. This property is accessible from \e outside our component, this allows us to instantiate the cells with different colors.