QtThe QML global Qt object provides useful enums and functions from Qt. More... Detailed DescriptionThe Qt object is a global object with utility functions, properties and enums. It is not instantiable; to use it, call the members of the global Qt object directly. For example: import QtQuick 2.0 Text { color: Qt.rgba(1, 0, 0, 1) text: Qt.md5("hello, world") } EnumsThe Qt object contains the enums available in the Qt Namespace. For example, you can access the Qt::LeftButton and Qt::RightButton enum values as Qt.LeftButton and Qt.RightButton. TypesThe Qt object also contains helper functions for creating objects of specific data types. This is primarily useful when setting the properties of an item when the property has one of the following types:
There are also string based constructors for these types. See QML Basic Types for more information. Date/Time FormattersThe Qt object contains several functions for formatting QDateTime, QDate and QTime values.
The format specification is described at Qt.formatDateTime. Dynamic Object CreationThe following functions on the global object allow you to dynamically create QML items from files or strings. See Dynamic Object Management in QML for an overview of their use.
Other FunctionsThe following functions are also on the Qt object. |