Qt 4.8
QML Class Reference

The QML global Qt object provides useful enums and functions from Qt. More...

Detailed Description

The QML global Qt object provides useful enums and functions from Qt.

QmlGlobalQtObject

Note
The Qt object provides useful enums and functions from Qt, for use in all QML files.

The 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 1.0
Text {
color: Qt.rgba(1, 0, 0, 1)
text: Qt.md5("hello, world")
}

Enums

The 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.

/Time-Formatters

Date/Time Formatters

The Qt object contains several functions for formatting QDateTime, QDate and QTime values.

The format specification is described at QML:Qt::formatDateTime "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.


The documentation for this class was generated from the following file: