Qt QML QML Types▲
The Qt Qml module provides the definition and implementation of various convenience types that can be used with the QML language. This includes elementary QML types, which can provide the basis for further extensions to the QML language. The QtObject and Component object types are non-visual and provide building-blocks for extensions to QML.
Importing QtQml▲
The types provided by the QtQml module are only available in a QML document if that document imports the QtQml namespace (or if the document imports the QtQuick namespace, as noted below).
To use the module, import the QtQml module with the following statement:
import
QtQml
Many clients will never need to use the QtQml module directly, but will rather import it indirectly via the QtQuick module as follows:
import
QtQuick
See the Qt Quick module documentation for more information about its types.
The QML types for creating lists and models, such as ListModel and ListElement, belong to a submodule, QtQml.Models.
The WorkerScript QML type belongs to the submodule QtQml.WorkerScript.
Both, QtQml.Models and QtQml.WorkerScript are automatically imported whenever you import QtQml. All their types are then available, too.
The Qt Quick module automatically imports QtQml and, transitively, QtQml.Models and QtQml.WorkerScript, making all their types available whenever you import QtQuick.
Value Types▲
The following QML Value Types are provided:
Sequence Types▲
The following QML sequence types are provided by the Qt QML module in addition to the ones registered with each value type and object type:
-
std::vector<QString>
-
std::vector<QUrl>
-
std::vector<bool>
-
std::vector<int>
-
std::vector<float>
-
std::vector<double>
Object Types▲
The following QML object types are provided:
Contents▲
-
Binding: Enables the arbitrary creation of property bindings.
-
Component: Encapsulates a QML component definition.
-
Connections: Describes generalized connections to signals.
-
Date: Provides date functions.
-
Locale: Provides locale specific properties and formatted data.
-
LoggingCategory: Defines a logging category in QML.
-
Number: The Number object provides represents a number value.
-
Qt: Provides a global object with useful enums and functions from Qt.
-
QtObject: A basic QML type.
-
Timer: Triggers a handler at a specified interval.
-
XMLHttpRequest: Object for sending requests to a server.