diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-11-04 06:22:09 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-11-04 06:22:09 (GMT) |
commit | 032bea71a17e6c79346b2df926a5755a22a3d95b (patch) | |
tree | f33d5eeaf6a5b1aa9df9c42149c563093d66de98 /doc/src/declarative/extending.qdoc | |
parent | 693a1dd90dc2e5a9ba7aabed5fcc3984e7440ba9 (diff) | |
parent | eedb9980c89e77e21e1336195930a148b6a2e712 (diff) | |
download | Qt-032bea71a17e6c79346b2df926a5755a22a3d95b.zip Qt-032bea71a17e6c79346b2df926a5755a22a3d95b.tar.gz Qt-032bea71a17e6c79346b2df926a5755a22a3d95b.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'doc/src/declarative/extending.qdoc')
-rw-r--r-- | doc/src/declarative/extending.qdoc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 18887c7..5c1b977 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -647,7 +647,8 @@ language. \section1 Adding new properties -New properties can be added to an existing type. These new properties are +New properties can be added to an existing type using the \c property keyword. +These new properties are available for use within QML, and also appear as regular Qt properties on the C++ object, accessible through the regular property access mechanisms. @@ -679,8 +680,12 @@ like this: property list<Item> listOfItemsProperty \endcode +Custom types must be registered with qmlRegisterType() to be usable as a property +type. Also note that list properties cannot be modified like ordinary JavaScript +arrays; see the \l {list}{list type documentation} for details. + QML supports two methods for adding a new property to a type: a new property -definition, and a property alias. +definition, and a property alias. These are shown below. \section2 Property definitions |