1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
7\brief The Qt QML module defines and implements the QML language
9The Qt QML module provides a framework for developing applications and libraries
10with the \l{QML Applications}{QML language}. It defines and implements the
11language and engine infrastructure, and provides an API to enable application
12developers to extend the QML language with custom types and integrate QML code
13with JavaScript and C++. The Qt QML module provides both a \l{Qt QML QML Types}
14{QML API} and a \l{Qt QML C++ Classes}{C++ API}.
16Note that while the Qt QML module provides the language and infrastructure
17for QML applications, the \l{Qt Quick} module provides many visual components,
18model-view support, an animation framework, and much more for building user
21If you're new to QML and Qt Quick, see \l{QML Applications} for an
22introduction to writing QML applications.
24\section1 Using the Module
28\include {module-use.qdocinc} {using the qml api} {QtQml}
32\include {module-use.qdocinc} {using the c++ api}
34\section3 Building with CMake
36\include {module-use.qdocinc} {building with cmake} {Qml}
38To provide foreign QML type support for a non-QML library, locate
39the \c QmlIntegration module as follows:
41\snippet code/doc_src_qtqml.cmake 1
43See \l{qt6_generate_foreign_qml_types} for details.
45\section3 Building with qmake
47\include {module-use.qdocinc} {building_with_qmake} {qml}
49\section1 QML and QML Types
51The Qt QML module contains the QML framework and important QML types used in
52applications. The constructs of QML are described in the \l{The QML Reference}.
54In addition to the \l{QML Value Types}, the module comes with
55the following QML object types:
64The \l{QtQml::Qt}{Qt} global object provides useful enums and functions
67\section2 Lists and Models
69New in Qt 5.1, the model types are moved to a submodule, \c QtQml.Models. The
70\l{Qt QML Models QML Types}{Qt QML Models} page has more information.
74 \li \l DelegateModelGroup
80\section1 JavaScript Environment for QML Applications
82JavaScript expressions allow QML code to contain application logic. Qt QML
83provides the framework for running JavaScript expressions in QML and from C++.
85These sections are from \l{The QML Reference}.
87 \li \l {qtqml-javascript-topic.html} {Integrating QML and JavaScript}
88 \li \l {qtqml-javascript-expressions.html}
89 {Using JavaScript Expressions with QML}
90 \li \l {qtqml-javascript-dynamicobjectcreation.html}
91 {Dynamic QML Object Creation from JavaScript}
92 \li \l {qtqml-javascript-resources.html}
93 {Defining JavaScript Resources In QML}
94 \li \l {qtqml-javascript-imports.html}
95 {Importing JavaScript Resources In QML}
96 \li \l {qtqml-javascript-hostenvironment.html}
97 {JavaScript Host Environment}
100\section1 Integrating QML with C++ Applications
102The module also provides the framework for running QML applications.
103The QML framework allows QML code to contain JavaScript expressions and for
104the QML code to interact with C++ code.
106\section2 Articles and Guides
109 \li \l {Overview - QML and C++ Integration}
110 \li \l {Data Type Conversion Between QML and C++}
111 \li \l {Integrating with JavaScript values from C++}
112 \li \l {Exposing Attributes of C++ Types to QML}
113 \li \l {Defining QML Types from C++}
114 \li \l {Writing QML Modules}
115 \li \l {Important C++ Classes Provided By The Qt QML Module}
121 \li \l {Writing QML Extensions with C++}
122 \li \l {Writing advanced QML Extensions with C++}
126 \section1 Additional Frameworks
128 \li \l{The Declarative State Machine Framework}
132\section1 Licenses and Attributions
134Qt QML is available under commercial licenses from \l{The Qt Company}.
135In addition, it is available under free software licenses. Since Qt 5.4,
136these free software licenses are
137\l{GNU Lesser General Public License, version 3}, or
138the \l{GNU General Public License, version 2}.
139See \l{Qt Licensing} for further details.
141Furthermore Qt QML in Qt \QtVersion may contain third party
142modules under following permissive licenses:
144\generatelist{groupsbymodule attributions-qtqml}
146\section1 Related Articles and Guides
148Further information for writing QML applications:
150 \li \l {The QML Reference}
151 \li \l {Qt Quick Compiler}
152 - overview of Qt Quick Compiler components
153 \li \l {QML Applications}
154 - essential information for application development with QML and Qt
157 - a module which provides a set of QML types and C++ classes for
158 building user interfaces and applications with QML
159 \li \l {The QML Disk Cache}
160 - how to fine tune if and where the QML engine caches compilation
167 \li \l {Qt QML C++ Classes} {C++ Classes}
168 \li \l {Qt QML QML Types} {QML Types}