1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** GNU Free Documentation License
10 ** Alternatively, this file may be used under the terms of the GNU Free
11 ** Documentation License version 1.3 as published by the Free Software
12 ** Foundation and appearing in the file included in the packaging of
16 ** Alternatively, this file may be used in accordance with the terms
17 ** and conditions contained in a signed written agreement between you
26 ****************************************************************************/
28 \page qtqml-basictypes.html
29 \title QML Basic Types
30 \brief Description of basic types provided by the Qt QML module
32 QML supports a number of basic types.
34 A \e{basic type} is one that refers to a simple value, such as an \c int
35 or a \c string. This contrasts with a \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Types},
36 which refers to an object with properties, signals, methods and so on. Unlike an object type,
37 a basic type cannot be used to declare QML objects: it is not possible, for example, to declare an
38 \c int{} object or a \c size{} object.
40 Basic types can be used to refer to:
43 \li A single value (e.g. \l int refers to a single number, \l var can refer to a single list of items)
44 \li A value that contains a simple set of property-value pairs (e.g. \l size refers to a value with \c width and \c height attributes)
47 \sa {qtqml-typesystem-topic.html}{The QML Type System}
50 \section1 Supported Basic Types
52 Most basic types are supported by the engine by default and do not require an
53 \l {Import Statements}{Import Statement} to be used, unlike QML object types.
54 Some basic types which contain multiple property-value pairs (also known as \c{value types})
55 do require an import, as they are provided by the QtQuick module.
56 The basic types supported in QML are listed below:
58 \annotatedlist qmlbasictypes
61 \section1 Property Change Behavior for Basic Types
63 Some basic types have properties: for example, the \l font type has
64 \c pixelSize, \c family and \c bold properties. Unlike properties of
65 \l{qtqml-typesystem-topic.html#qml-object-types}{object types}, properties of
66 basic types do not provide their own property change signals. It is only possible
67 to create a property change signal handler for the basic type property itself:
72 onFont.pixelSizeChanged: doSomething()
76 onPixelSizeChanged: doSomething()
80 onFontChanged: doSomething()
84 Be aware, however, that a property change signal for a basic type is emitted
85 whenever \e any of its attributes have changed, as well as when the property itself
86 changes. Take the following code, for example:
90 onFontChanged: console.log("font changed")
92 Text { id: otherText }
96 // changing any of the font attributes, or reassigning the property
97 // to a different font value, will invoke the onFontChanged handler
98 Keys.onDigit1Pressed: font.pixelSize += 1
99 Keys.onDigit2Pressed: font.bold = !font.bold
100 Keys.onDigit3Pressed: font = otherText.font
104 In contrast, properties of an \l{qtqml-typesystem-topic.html#qml-object-types}{object type}
105 emit their own property change signals, and a property change signal handler for an object-type
106 property is only invoked when the property is reassigned to a different object value.
112 \ingroup qmlbasictypes
113 \brief a whole number, e.g. 0, 10, or -20.
115 The \c int type refers to a whole number, e.g. 0, 10, or -20.
117 The possible \c int values range from around -2000000000 to around 2000000000,
118 although most elements will only accept a reduced range (which they
119 mention in their documentation).
123 Item { width: 100; height: 200 }
126 This basic type is provided by the QML language.
128 \sa {QML Basic Types}
133 \ingroup qmlbasictypes
134 \brief a binary true/false value.
136 The \c bool type refers to a binary true/false value.
146 This basic type is provided by the QML language.
148 \sa {QML Basic Types}
153 \ingroup qmlbasictypes
155 \brief a number with a decimal point.
157 The \c real type refers to a number with decimal point, e.g. 1.2 or -29.8.
161 Item { width: 100.45; height: 150.82 }
164 \b{Note:} In QML all reals are stored in double precision, \l
165 {http://en.wikipedia.org/wiki/IEEE_754} {IEEE floating point}
168 This basic type is provided by the QML language.
170 \sa {QML Basic Types}
175 \ingroup qmlbasictypes
177 \brief a number with a decimal point, stored in double precision.
179 The \c double type refers to a number with a decimal point and is stored in double precision, \l
180 {http://en.wikipedia.org/wiki/IEEE_754} {IEEE floating point} format.
185 property double number: 32155.2355
189 This basic type is provided by the QML language.
191 \sa {QML Basic Types}
196 \ingroup qmlbasictypes
197 \brief a free form text string.
199 The \c string type refers to a free form text string in quotes, e.g. "Hello world!".
203 Text { text: "Hello world!" }
206 Strings have a \c length attribute that holds the number of
207 characters in the string.
209 QML extends the JavaScript String type with a \l {String::arg}{arg()} function
210 to support value substitution.
212 When integrating with C++, note that any QString value
213 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
214 converted into a \c string value, and vice-versa.
216 This basic type is provided by the QML language.
218 \sa {QML Basic Types}
223 \ingroup qmlbasictypes
224 \brief a resource locator.
226 The \c url type refers to a resource locator (like a file name, for example). It can be either
227 absolute, e.g. "http://qt.nokia.com", or relative, e.g. "pics/logo.png". A relative URL is
228 resolved relative to the URL of the containing component.
230 For example, the following assigns a valid URL to the \l {Image::source}
231 property, which is of type \c url:
234 Image { source: "pics/logo.png" }
237 When integrating with C++, note that any QUrl value
238 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
239 converted into a \c url value, and vice-versa.
242 \section1 Using the url type
244 When a relative URL is written to a \c url type property, it is converted
245 into a URL object, so \bold {matching the URL value against the input string
246 value will fail}. Instead, convert the string to a URL using Qt.resolvedUrl()
247 for means of comparison, and use \c toString() to get the contents of the URL:
251 source: "pics/logo.png"
253 Component.onCompleted: {
254 // This prints 'false'. Although "pics/logo.png" was the input string,
255 // it's been converted from a string to a URL, so these two are not the same.
256 console.log(source == "pics/logo.png")
258 // This prints 'true' as Qt.resovledUrl() converts the string into a
259 // URL with the correctly resolved path
260 console.log(source == Qt.resolvedUrl("pics/logo.png"))
262 // This prints the absolute path, e.g. "file:///path/to/pics/logo.png"
263 console.log(source.toString())
268 \note When referring to files stored with the \l{resources.html}{Qt Resource System}
269 from within QML, you should use "qrc:///" instead of ":/" as QML requires URL paths.
270 Relative URLs resolved from within that file will use the same protocol.
272 Additionally, URLs may contain encoded characters using the 'percent-encoding' scheme
273 specified by \l {http://tools.ietf.org/html/rfc3986}{RFC 3986}. These characters
274 will be preserved within properties of type \c url, to allow QML code to
275 construct precise URL values. An exception to this rule is the preemptive
276 decoding of directory-separator characters (\c '/') - these characters are decoded
277 to allow the URL to be correctly classified.
279 For example, a local file containing a '#' character, which would normally be
280 interpreted as the beginning of the URL 'fragment' element, can be accessed by
281 encoding the characters of the file name:
284 Image { source: encodeURIComponent("/tmp/test#1.png") }
287 This basic type is provided by the QML language.
289 \sa {QML Basic Types}
294 \ingroup qmlbasictypes
295 \brief an ARGB color value.
296 \target qmlbasictypecolor
298 The \c color type refers to an ARGB color value. It can be specified in a number of ways:
301 \li By a \l{http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG color name}, such as
302 "red", "green" or "lightsteelblue".
303 \li By a hexadecimal triplet or quad in the form \c "#RRGGBB" and \c "#AARRGGBB"
304 respectively. For example, the color red corresponds to a triplet of \c "#FF0000"
305 and a slightly transparent blue to a quad of \c "#800000FF".
306 \li Using the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()},
307 \l{QML:Qt::darker()}{Qt.darker()}, \l{QML:Qt::lighter()}{Qt.lighter()} or
308 \l{QML:Qt::tint()}{Qt.tint()} functions.
314 \inlineimage declarative-colors.png
316 \snippet qml/colors.qml colors
318 Additionally, a color type has \c r, \c g, \c b and \c a properties that refer to the
319 red, green, blue and alpha values of the color, respectively:
326 Component.onCompleted: console.log(color.r, color.g, color.b, color.a)
330 To test color values for equality, use the \l{QML:Qt::colorEqual()}{Qt.colorEqual()}
331 function. This allows colors to be accurately compared whether they are in property
332 form or in any of the acceptable string specification forms.
334 When integrating with C++, note that any QColor value
335 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
336 converted into a \c color value, and vice-versa.
338 This basic type is provided by the QtQuick import.
340 \sa {QML Basic Types}
345 \ingroup qmlbasictypes
346 \brief a value with x and y attributes.
348 The \c point type refers to a value with \c x and \c y attributes.
350 To create a \c point value, specify it as a "x,y" string:
353 CustomObject { myPointProperty: "0,20" }
356 Or use the \l{QML:Qt::point()}{Qt.point()} function:
359 CustomObject { myPointProperty: Qt.point(0, 20) }
362 When integrating with C++, note that any QPoint or QPointF value
363 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
364 converted into a \c point value. When a \c point value is passed to C++, it
365 is automatically converted into a QPointF value.
367 This basic type is provided by the QML language.
369 \sa {QML Basic Types}
374 \ingroup qmlbasictypes
375 \brief a value with width and height attributes
377 The \c size type refers to a value with has \c width and \c height attributes.
379 For example, to read the \c width and \c height values of the
380 \l {Image::sourceSize} size-type property:
384 Image { id: image; source: "logo.png" }
385 Text { text: image.sourceSize.width + "," + image.sourceSize.height }
389 To create a \c size value, specify it as a "width x height" string:
392 Image { sourceSize: "150x50" }
395 Or use the \l{QML:Qt::size()}{Qt.size()} function:
398 Image { sourceSize: Qt.size(150, 50) }
401 When integrating with C++, note that any QSize or QSizeF value
402 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
403 converted into a \c size value, and vice-versa. When a \c size value is passed to C++, it
404 is automatically converted into a QSizeF value.
406 This basic type is provided by the QML language.
408 \sa {QML Basic Types}
413 \ingroup qmlbasictypes
414 \brief a value with x, y, width and height attributes.
416 The \c rect type refers to a value with \c x, \c y, \c width and \c height attributes.
418 For example, to read the \c width and \c height values of the \l Item
419 \l {Item::}{childrenRect} rect-type type property:
423 width: childrenRect.width
424 height: childrenRect.height
426 Rectangle { width: 100; height: 100 }
430 To create a \c rect value, specify it as a "x, y, width x height" string:
433 CustomObject { myRectProperty: "50,50,100x100" }
436 Or use the \l{QML:Qt::rect()}{Qt.rect()} function:
439 CustomObject { myRectProperty: Qt.rect(50, 50, 100, 100) }
442 When integrating with C++, note that any QRect or QRectF value
443 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
444 converted into a \c rect value, and vice-versa. When a \c rect value is passed to C++, it
445 is automatically converted into a QRectF value.
447 This basic type is provided by the QML language.
449 \sa {QML Basic Types}
454 \ingroup qmlbasictypes
457 The \c date type refers to a date value.
459 To create a \c date value, specify it as a "YYYY-MM-DD" string:
462 MyDatePicker { minDate: "2000-01-01"; maxDate: "2020-12-31" }
465 To read a date value returned from a C++ extension class, use
466 \l{QML:Qt::formatDate()}{Qt.formatDate()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}.
468 When integrating with C++, note that any QDate value
469 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
470 converted into a \c date value, and vice-versa.
472 Note that the date type has comparison semantics which match
473 those of the JavaScript Date object. To compare the value
474 of two date properties, you should compare their "toString()"
477 This basic type is provided by the QML language.
479 \sa {QML Basic Types}
484 \ingroup qmlbasictypes
487 The \c time type refers to a time value.
489 To create a \c time value, specified as "hh:mm:ss":
492 MyTimePicker { time: "14:22:15" }
495 To read a time value returned from a C++ extension class, use
496 \l{QML:Qt::formatTime()}{Qt.formatTime()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}.
498 Note that when converting historical times to and from javascript that QDateTime and the JS Date object
499 have different methods of calculating historical daylight savings time application. This can lead to variations of one hour
500 when converting to historical local time.
502 When integrating with C++, note that any QTime value
503 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
504 converted into a \c time value, and vice-versa.
506 This basic type is provided by the QML language.
508 \sa {QML Basic Types}
513 \ingroup qmlbasictypes
514 \brief a font value with the properties of QFont.
515 \target fontbasictypedocs
517 The \c font type refers to a font value with the properties of QFont.
519 These properties are:
522 \li \l string \c font.family
523 \li \l bool \c font.bold
524 \li \l bool \c font.italic
525 \li \l bool \c font.underline
526 \li \l real \c font.pointSize
527 \li \l int \c font.pixelSize
532 Text { font.family: "Helvetica"; font.pointSize: 13; font.bold: true }
535 When integrating with C++, note that any QFont value
536 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
537 converted into a \c font value, and vice-versa.
539 This basic type is provided by the QtQuick import.
541 \sa {QML Basic Types}
546 \ingroup qmlbasictypes
547 \brief a list of QML objects.
549 The \c list type refers to a list of QML objects.
551 A list value can be accessed in a similar way to a JavaScript array:
554 \li Values are assigned using the \c[] square bracket syntax with comma-separated values
555 \li The \c length property provides the number of items in the list
556 \li Values in the list are accessed using the \c [index] syntax
559 A \c list can only store QML objects, and cannot contain any
560 \l {QML Basic Types}{basic type} values. (To store basic types within a
561 list, use the \l var type instead.)
563 When integrating with C++, note that any QQmlListProperty value
564 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
565 converted into a \c list value, and vice-versa.
568 \section1 Using the list type
570 For example, the \l Item type has a \l {Item::}{states} list-type property that
571 can be assigned to and used as follows:
577 width: 100; height: 100
580 State { name: "activated" },
581 State { name: "deactivated" }
584 Component.onCompleted: {
585 console.log("Name of first state:", states[0].name)
586 for (var i=0; i<states.length; i++)
587 console.log("state", i, states[i].name)
592 The defined \l State objects will be added to the \c states list
593 in the order in which they are defined.
595 If the list only contains one object, the square brackets may be omitted:
601 width: 100; height: 100
602 states: State { name: "activated" }
606 Note that objects cannot be individually added to or removed from
607 the list once created; to modify the contents of a list, it must be
608 reassigned to a new list.
610 \note The \c list type is not recommended as a type for custom properties.
611 The \c var type should be used instead for this purpose as
612 lists stored by the \c var type can be manipulated with greater
613 flexibility from within QML.
615 This basic type is provided by the QML language.
617 \sa {QML Basic Types}
622 \ingroup qmlbasictypes
623 \brief a generic property type.
625 The \c var type is a generic property type that can refer to any data type.
627 It is equivalent to a regular JavaScript variable.
628 For example, var properties can store numbers, strings, objects,
629 arrays and functions:
633 property var aNumber: 100
634 property var aBool: false
635 property var aString: "Hello world!"
636 property var anotherString: String("#FF008800")
637 property var aColor: Qt.rgba(0.2, 0.3, 0.4, 0.5)
638 property var aRect: Qt.rect(10, 10, 10, 10)
639 property var aPoint: Qt.point(10, 10)
640 property var aSize: Qt.size(10, 10)
641 property var aVector3d: Qt.vector3d(100, 100, 100)
642 property var anArray: [1, 2, 3, "four", "five", (function() { return "six"; })]
643 property var anObject: { "foo": 10, "bar": 20 }
644 property var aFunction: (function() { return "one"; })
648 It is important to note that changes in regular properties of JavaScript
649 objects assigned to a var property will \b{not} trigger updates of bindings
650 that access them. The example below will display "The car has 4 wheels" as
651 the change to the wheels property will not cause the reevaluation of the
652 binding assigned to the "text" property:
656 property var car: new Object({wheels: 4})
659 text: "The car has " + car.wheels + " wheels";
662 Component.onCompleted: {
668 If the onCompleted handler instead had \tt{"car = new Object({wheels: 6})"}
669 then the text would be updated to say "The car has 6 wheels", since the
670 car property itself would be changed, which causes a change notification
673 \section1 Using Scarce Resources with the var Type
675 A \c var type property can also hold an image or pixmap.
676 A \c var which contains a QPixmap or QImage is known as a
677 "scarce resource" and the declarative engine will attempt to
678 automatically release such resources after evaluation of any JavaScript
679 expression which requires one to be copied has completed.
681 Clients may explicitly release such a scarce resource by calling the
682 "destroy" method on the \c var property from within JavaScript. They
683 may also explicitly preserve the scarce resource by calling the
684 "preserve" method on the \c var property from within JavaScript.
685 For more information regarding the usage of a scarce resource, please
686 see \l{Scarce Resources in JavaScript}.
688 This basic type is provided by the QML language.
690 \sa {QML Basic Types}
696 \qmlbasictype variant
697 \ingroup qmlbasictypes
698 \brief a generic property type.
700 The \c variant type is a generic property type. It is obsolete and exists only to
701 support old applications; new applications should use \l var type
704 A variant type property can hold any of the \l {QML Basic Types}{basic type}
709 property variant aNumber: 100
710 property variant aString: "Hello world!"
711 property variant aBool: false
715 When integrating with C++, note that any QVariant value
716 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
717 converted into a \c variant value, and vice-versa.
720 \section1 Using Scarce Resources with the variant Type
722 A \c variant type property can also hold an image or pixmap.
723 A \c variant which contains a QPixmap or QImage is known as a
724 "scarce resource" and the declarative engine will attempt to
725 automatically release such resources after evaluation of any JavaScript
726 expression which requires one to be copied has completed.
728 Clients may explicitly release such a scarce resource by calling the
729 "destroy" method on the \c variant property from within JavaScript. They
730 may also explicitly preserve the scarce resource by calling the
731 "preserve" method on the \c variant property from within JavaScript.
732 For more information regarding the usage of a scarce resource, please
733 see \l{Scarce Resources in JavaScript}.
735 \section1 Storing Arrays and Objects
737 The \c variant type can also hold:
740 \li An array of \l {QML Basic Types}{basic type} values
741 \li A map of key-value pairs with \l {QML Basic Types}{basic-type} values
744 For example, below is an \c items array and an \c attributes map. Their
745 contents can be examined using JavaScript \c for loops. Individual array
746 values are accessible by index, and individual map values are accessible
751 property variant items: [1, 2, 3, "four", "five"]
752 property variant attributes: { 'color': 'red', 'width': 100 }
754 Component.onCompleted: {
755 for (var i=0; i<items.length; i++)
756 console.log(items[i])
758 for (var prop in attributes)
759 console.log(prop, "=", attributes[prop])
764 While this is a convenient way to store array and map-type values, you
765 must be aware that the \c items and \c attributes properties above are \e not
766 QML objects (and certainly not JavaScript object either) and the key-value
767 pairs in \c attributes are \e not QML properties. Rather, the \c items
768 property holds an array of values, and \c attributes holds a set of key-value
769 pairs. Since they are stored as a set of values, instead of as an object,
770 their contents \e cannot be modified individually:
774 property variant items: [1, 2, 3, "four", "five"]
775 property variant attributes: { 'color': 'red', 'width': 100 }
777 Component.onCompleted: {
779 console.log(items[0]) // This will still be '1'!
780 attributes.color = 'blue'
781 console.log(attributes.color) // This will still be 'red'!
786 Since it is not possible to individually add or remove items from a list or
787 object stored in a \c variant, the only way to modify its contents is to
788 reassign a new value. However, this is not efficent, as it causes the value
789 to be serialized and deserialized.
791 Additionally, since \c items and \c attributes are not QML objects, changing
792 their individual values do not trigger property change notifications. If
793 the above example had \c onNumberChanged or \c onAnimalChanged signal
794 handlers, they would not have been called. If, however, the \c items or
795 \c attributes properties themselves were reassigned to different values, then
796 such handlers would be called.
798 JavaScript programmers should also note that when a JavaScript object is
799 copied to an array or map property, the \e contents of the object (that is,
800 its key-value properties) are copied, rather than the object itself. The
801 property does not hold a reference to the original JavaScript object, and
802 extra data such as the object's JavaScript prototype chain is also lost in
805 This basic type is provided by the QML language.
807 \sa {QML Basic Types}
811 \qmlbasictype vector2d
812 \ingroup qmlbasictypes
814 \brief A vector2d type has x and y attributes.
816 A \c vector2d type has \c x and \c y attributes, otherwise
817 it is similar to the \c vector3d type. Please see the
818 documentation about the \c vector3d type for more information.
820 To create a \c vector2d value, specify it as a "x,y" string,
821 or define the components individually, or compose it with
822 the Qt.vector2d() function.
824 This basic type is provided by the QtQuick import.
826 \sa {QML Basic Types}
830 \qmlbasictype vector3d
831 \ingroup qmlbasictypes
832 \brief a value with x, y, and z attributes.
834 The \c vector3d type refers to a value with \c x, \c y, and \c z attributes.
836 To create a \c vector3d value, specify it as a "x,y,z" string:
839 Rotation { angle: 60; axis: "0,1,0" }
842 or with the \l{QML:Qt::vector3d()}{Qt.vector3d()} function:
845 Rotation { angle: 60; axis: Qt.vector3d(0, 1, 0) }
848 or as separate \c x, \c y, and \c z components:
851 Rotation { angle: 60; axis.x: 0; axis.y: 1; axis.z: 0 }
854 When integrating with C++, note that any QVector3D value
855 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
856 converted into a \c vector3d value, and vice-versa.
858 This basic type is provided by the QtQuick import.
860 \sa {QML Basic Types}
864 \qmlbasictype vector4d
865 \ingroup qmlbasictypes
867 \brief A vector4d type has x, y, z and w attributes.
869 A \c vector4d type has \c x, \c y, \c z and \c w attributes,
870 otherwise it is similar to the \c vector3d type. Please see the
871 documentation about the \c vector3d type for more information.
873 To create a \c vector4d value, specify it as a "x,y,z,w" string,
874 or define the components individually, or compose it with
875 the Qt.vector4d() function.
877 This basic type is provided by the QtQuick import.
879 \sa {QML Basic Types}
883 \qmlbasictype quaternion
884 \ingroup qmlbasictypes
886 \brief A quaternion type has scalar, x, y, and z attributes.
888 A \c quaternion type has \c scalar, \c x, \c y and \c z attributes,
889 otherwise it is similar to the \c vector3d type. Please see the
890 documentation about the \c vector3d type for more information.
892 To create a \c quaternion value, specify it as a "scalar,x,y,z" string,
893 or define the components individually, or compose it with
894 the Qt.quaternion() function.
896 This basic type is provided by the QtQuick import.
898 \sa {QML Basic Types}
902 \qmlbasictype matrix4x4
903 \ingroup qmlbasictypes
905 \brief A matrix4x4 type is a 4-row and 4-column matrix
907 A \c matrix4x4 type has sixteen values, but these values are
908 largely opaque to QML. Values of this type can be composed with
909 the Qt.matrix4x4() function.
911 This basic type is provided by the QtQuick import.
913 \sa {QML Basic Types}
917 \qmlbasictype enumeration
918 \ingroup qmlbasictypes
919 \brief a set of named values.
921 The \c enumeration type refers to a set of named values.
923 Each named value can be referred to as \c {<Type>.<value>}. For
924 example, the \l Text type has an \c AlignRight enumeration value:
927 Text { horizontalAlignment: Text.AlignRight }
930 (For backwards compatibility, the enumeration value may also be
931 specified as a string, e.g. "AlignRight". This form is not
932 recommended for new code.)
934 When integrating with C++, note that any enumeration value
935 \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
936 converted into an \c enumeration value, and vice-versa.
938 This basic type is provided by the QML language. Some enumeration values
939 are provided by the QtQuick import.
941 \sa {QML Basic Types}