Update docs now that all basic types can also be property types
authorBea Lam <bea.lam@nokia.com>
Thu, 2 Aug 2012 00:58:07 +0000 (10:58 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 2 Aug 2012 03:44:41 +0000 (05:44 +0200)
Change-Id: I9f90627dc3f83e64e6d1d7b2937fdf5653a063f3
Reviewed-by: Chris Adams <christopher.adams@nokia.com>

src/qml/doc/src/syntax/objectattributes.qdoc

index 741b7cb..fa84b79 100644 (file)
@@ -146,18 +146,26 @@ Rectangle {
 
 \section4 Valid Types in Custom Property Definitions
 
-The following types can be used as custom property types:
+Any of the \l {QML Basic Types} aside from the \l enumeration type can be used
+as custom property types. For example, these are all valid property declarations:
 
-\list
-\li \l bool
-\li \l int
-\li \l real, \l double
-\li \l string
-\li \l var
-\endlist
+\qml
+Item {
+    property int someNumber
+    property string someString
+    property url someUrl
+}
+\endqml
+
+(Enumeration values are simply whole number values and can be referred to with
+the \l int type instead.)
 
-The \l var type is a generic placeholder type that can hold any type of value,
-including lists and objects:
+Some basic types are provided by the \c QtQuick module and thus cannot be used
+as property types unless the module is imported. See the \l {QML Basic Types}
+documentation for more details.
+
+Note the \l var basic type is a generic placeholder type that can hold any
+type of value, including lists and objects:
 
 \code
 property var someNumber: 1.5
@@ -167,28 +175,6 @@ property var someList: [1, 2, "three", "four"]
 property var someObject: Rectangle { width: 100; height: 100; color: "red" }
 \endcode
 
-For convenience, the following types can also be used as custom property types.
-Using these types specifically instead of the \l var type provides type safety
-and may also assist with application optimization:
-
-\list
-\li \l color
-\li \l font
-\li \l date
-\li \l url
-\li \l rect
-\li \l point
-\li \l size
-\li \l vector2d
-\li \l vector3d
-\li \l vector4d
-\li \l quaternion
-\li \l matrix4x4
-\endlist
-
-\note Some of the above types are only available if the Qt Quick module has
-been imported by the application.
-
 Additionally, any \l{QML Object Types}{QML object type} can be used as a
 property type. For example: