summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/extending.qdoc
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-30 01:21:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-30 01:21:48 (GMT)
commitc4f59859a589b76419e9133110eda850223f03dd (patch)
tree051b589cc93c609f0668a5c748efec854723b487 /doc/src/declarative/extending.qdoc
parent4fb6cae4dd0c6a90008780df606abb8a9e73cb2c (diff)
parent1494bc444f43e98250f9d29c50a128e5cf4ca328 (diff)
downloadQt-c4f59859a589b76419e9133110eda850223f03dd.zip
Qt-c4f59859a589b76419e9133110eda850223f03dd.tar.gz
Qt-c4f59859a589b76419e9133110eda850223f03dd.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (136 commits) Make QDeclarativeListProperty a class Fix qdeclarativedom::loadDynamicProperty test Correctly parent repeater items. Make sure cursor delegate is parented. Allow just one dimension to be set, the other scaled accordingly Simplify import path. Removed unneeded code. Update autotest a little Improve QML compiler statistics Use error enum not numbers Pass test. doc test error code too QDeclarativeItem::setParentItem should not modify the QObject parent Doc Ensure currentIndex is updated when PathView items are removed/moved Visual test fixes. Doc Relayout items when Flow size changes. Make sure the image reader thread is shutdown properly ...
Diffstat (limited to 'doc/src/declarative/extending.qdoc')
-rw-r--r--doc/src/declarative/extending.qdoc16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 8c096da..b6aa9da 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -654,9 +654,8 @@ declaring a new property, and the corresponding C++ type.
\row \o string \o QString
\row \o url \o QUrl
\row \o color \o QColor
-\row \o date \o QDate
+\row \o date \o QDateTime
\row \o var \o QVariant
-\row \o variant \o QVariant
\endtable
QML supports two methods for adding a new property to a type: a new property
@@ -693,6 +692,19 @@ it in two steps, like this:
myProperty: 10
\endcode
+If a default value is not supplied or set later in the file, each type has a
+default value for when none is explictly set. Below are the default values
+of some of the types. For the remaining types the default values are undefined.
+
+\table
+\header \o QML Type \o Default Value
+\row \o bool \o false
+\row \o int \o 0
+\row \o double, real \o 0.0
+\row \o string, url \o "" (an empty string)
+\row \o color \o #000000 (black)
+\endtable
+
If specified, the optional "default" attribute marks the new property as the
types default property, overriding any existing default property. Using the
default attribute twice in the same type block is an error.