[Previous: QML Basic Elements] [Next: Property Binding]
QML has a set of primitive types, as listed below, that are used throughout the QML Elements.
The action type has all the properties of QAction. |
|
A boolean is a binary true/false value. |
|
A color is a standard color name in quotes. |
|
A date is specified as "YYYY-MM-DD". |
|
A double number has a decimal point and is stored in double precision. |
|
An enumeration type consists of a set of named values. |
|
A font type has the properties of a QFont. |
|
An integer is a whole number, e.g. 0, 10, or -20. |
|
A list of objects. |
|
A point type has x and y attributes. |
|
A real number has a decimal point, e.g. 1.2 or -29.8. |
|
A rect type has x, y, width and height attributes. |
|
A size type has width and height attributes |
|
A string is a free form text in quotes, e.g. "Hello world!". |
|
A time is specified as "hh:mm:ss". |
|
A URL is a resource locator, like a file name. |
|
A variant type is a generic property type. |
|
A vector3d type has x, y, and z attributes. |
To create additional types, such as data types created in C++, read the Extending QML Functionalities using C++ article.
[Previous: QML Basic Elements] [Next: Property Binding]
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.