Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qtqml.qdoc
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4/*!
5\page qtqml-index.html
6\title Qt QML
7\brief The Qt QML module defines and implements the QML language
8
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}.
15
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
19interfaces.
20
21If you're new to QML and Qt Quick, see \l{QML Applications} for an
22introduction to writing QML applications.
23
24\section1 Using the Module
25
26\section2 QML API
27
28\include {module-use.qdocinc} {using the qml api} {QtQml}
29
30\section2 C++ API
31
32\include {module-use.qdocinc} {using the c++ api}
33
34\section3 Building with CMake
35
36\include {module-use.qdocinc} {building with cmake} {Qml}
37
38To provide foreign QML type support for a non-QML library, locate
39the \c QmlIntegration module as follows:
40
41\snippet code/doc_src_qtqml.cmake 1
42
43See \l{qt6_generate_foreign_qml_types} for details.
44
45\section3 Building with qmake
46
47\include {module-use.qdocinc} {building_with_qmake} {qml}
48
49\section1 QML and QML Types
50
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}.
53
54In addition to the \l{QML Value Types}, the module comes with
55the following QML object types:
56\list
57 \li \l Component
58 \li \l QtObject
59 \li \l Binding
60 \li \l Connections
61 \li \l Timer
62\endlist
63
64The \l{QtQml::Qt}{Qt} global object provides useful enums and functions
65for various QML types.
66
67\section2 Lists and Models
68
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.
71
72\list
73 \li \l DelegateModel
74 \li \l DelegateModelGroup
75 \li \l ListElement
76 \li \l ListModel
77 \li \l ObjectModel
78\endlist
79
80\section1 JavaScript Environment for QML Applications
81
82JavaScript expressions allow QML code to contain application logic. Qt QML
83provides the framework for running JavaScript expressions in QML and from C++.
84
85These sections are from \l{The QML Reference}.
86\list
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}
98\endlist
99
100\section1 Integrating QML with C++ Applications
101
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.
105
106\section2 Articles and Guides
107
108\list
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}
116\endlist
117
118\section2 Tutorials
119
120\list
121 \li \l {Writing QML Extensions with C++}
122 \li \l {Writing advanced QML Extensions with C++}
123\endlist
124
125\omit
126 \section1 Additional Frameworks
127 \list
128 \li \l{The Declarative State Machine Framework}
129 \endlist
130\endomit
131
132\section1 Licenses and Attributions
133
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.
140
141Furthermore Qt QML in Qt \QtVersion may contain third party
142modules under following permissive licenses:
143
144\generatelist{groupsbymodule attributions-qtqml}
145
146\section1 Related Articles and Guides
147
148Further information for writing QML applications:
149\list
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
155 Quick
156 \li \l {Qt Quick}
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
161 results
162\endlist
163
164\section1 Reference
165
166\list
167 \li \l {Qt QML C++ Classes} {C++ Classes}
168 \li \l {Qt QML QML Types} {QML Types}
169\endlist
170*/