Qt Qml QML Types | Qt Qml (original) (raw)

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:

Many clients will never need to use the QtQml module directly, but will rather import it indirectly via the QtQuick module as follows:

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:

point Value with x and y attributes
rect Value with x, y, width and height attributes
size Value with width and height attributes

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:

Object Types

The following QML object types are provided:

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

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.