diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-17 19:12:14 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-17 19:12:14 (GMT) |
commit | 72900c3004825514244ebd38f38c0443b9774ad3 (patch) | |
tree | 11105094b00cfdb37dd088d4ca88ecaab9e0bab8 /doc/src/declarative/extending.qdoc | |
parent | 14f908687edd09664bc7909ef7a0bdd071456402 (diff) | |
download | Qt-72900c3004825514244ebd38f38c0443b9774ad3.zip Qt-72900c3004825514244ebd38f38c0443b9774ad3.tar.gz Qt-72900c3004825514244ebd38f38c0443b9774ad3.tar.bz2 |
Doc: Fixed qdoc warnings caused by invalid/incomplete QML snippets.
Diffstat (limited to 'doc/src/declarative/extending.qdoc')
-rw-r--r-- | doc/src/declarative/extending.qdoc | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index a1f006b..b986d06 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -733,12 +733,14 @@ It is optional for a property to have a default value. The default value is a co behaviorally identical to doing it in two steps, like this: \qml -// Use default value -property int myProperty: 10 +Item { + // Use default value + property int myProperty: 10 -// Longer, but behaviorally identical -property int myProperty -myProperty: 10 + // Longer, but behaviorally identical + property int myProperty + myProperty: 10 +} \endqml @@ -769,9 +771,11 @@ QML object types can also be used as property types. This includes defined like this: \qml -property Item itemProperty -property QtObject objectProperty -property MyCustomType customProperty +Item { + property Item itemProperty + property QtObject objectProperty + property MyCustomType customProperty +} \endqml Such object-type properties default to an \c undefined value. @@ -784,7 +788,9 @@ see the \l {variant}{variant type documentation} for details. list: \qml -property list<Item> listOfItems +Item { + property list<Item> listOfItems +} \endqml Note that list properties cannot be modified like ordinary JavaScript @@ -1075,7 +1081,7 @@ code removes the connection created in \c application.qml above: \qml // application.qml Item { - ... + // ... function removeSignal() { button.clicked.disconnect(item.myMethod) @@ -1100,5 +1106,4 @@ MouseArea { Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will automatically be emitted as well. - */ |