summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/extending.qdoc
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-04 14:19:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-04 14:19:15 (GMT)
commitf018d9236647b687e03dd9d2e1867944b4f4058b (patch)
treefa45c1bba51250efd04d630eef9a1d8ca4ca5941 /doc/src/declarative/extending.qdoc
parentbc331aca61a2f212a347708c9d44a4fb092183fd (diff)
parentf34259ed82da481f009830839ad4d421d9b80780 (diff)
downloadQt-f018d9236647b687e03dd9d2e1867944b4f4058b.zip
Qt-f018d9236647b687e03dd9d2e1867944b4f4058b.tar.gz
Qt-f018d9236647b687e03dd9d2e1867944b4f4058b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-staging: (216 commits) Doc: Fixed a reference to the wrong image. Fixed a bug that caused marked up inline text to be truncated. Doc: Renamed an image to ensure that it does not clash with another. Doc: Fixed QML, unindented snippet. Doc: Removed unnecessary HTML entity from the title. Doc: Fixed broken links to the old Symbian Foundation Wiki. Doc: Updated the copyright statements in the templates. Doc: Fixing typo Replace all occurances of "Qt 4.7" with "QtQuick 1.0" Doc: Adjusted the font sizes for the offline documentation. Doc: Added a missing style sheet to the qhp manifest. Doc: Fixed the qthelp namespace for the Qt documentation. Doc: including missing pages in overviews. Doc: Fixed typo in QCoreApplication docs Fixed whitespace. Avoid hard-coding product names in page titles. Doc: Unindented a code snippet. Doc: Fixed confusing wording of a sentence. Doc: Fixed a broken link. Doc: Updated the information about commercial editions of Qt. ...
Diffstat (limited to 'doc/src/declarative/extending.qdoc')
-rw-r--r--doc/src/declarative/extending.qdoc29
1 files changed, 17 insertions, 12 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 3f1413c..5a95551 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -802,12 +802,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
@@ -838,9 +840,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.
@@ -853,7 +857,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
@@ -894,7 +900,7 @@ If the \l{Item::children}{children} property was not the default property for
\qml
Item {
children: [
- Rectangle {}
+ Rectangle {},
Rectangle {}
]
}
@@ -1144,7 +1150,7 @@ code removes the connection created in \c application.qml above:
\qml
// application.qml
Item {
- ...
+ // ...
function removeSignal() {
button.clicked.disconnect(item.myMethod)
@@ -1169,5 +1175,4 @@ MouseArea {
Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will
automatically be emitted as well.
-
*/