Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtqml.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2023 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 implements the QML language and offers APIs to register
8
types for it.
9
10
The Qt Qml module provides a framework for developing applications and libraries
11
with the \l{The QML Reference}{QML language}. It defines and implements the
12
language and engine infrastructure, and provides an API to enable application
13
developers to \l{Registering QML Types and QML Modules}{register} custom QML types
14
and modules and integrate QML code with JavaScript and C++. The Qt Qml module
15
provides both a \l{Qt Qml QML Types}{QML API} and a
16
\l{Qt Qml C++ Classes}{C++ API}.
17
18
\section1 Using the Module
19
20
\section2 QML API
21
22
\include {module-use.qdocinc} {using the qml api} {QtQml}
23
24
The Qt Qml module contains the QML framework and important QML types used in
25
applications. The constructs of QML are described in the \l{The QML Reference}.
26
27
The \l{Qt Qml QML Types}{QML API} of the Qt Qml module provides a number of
28
\l{qtqml-typesystem-objecttypes.html}{QML Object Types},
29
\l{qtqml-typesystem-valuetypes.html}{QML Value Types} and namespaces.
30
31
\section2 C++ API
32
33
\include {module-use.qdocinc} {using the c++ api}
34
35
The C++ API contains some
36
\l{Important C++ Classes Provided By The Qt Qml Module}{important classes}
37
you should get familiar with. It also provides
38
\l{Integrating with JavaScript values from C++}{types} to hold JavaScript
39
values.
40
41
\section3 Building with CMake
42
43
\include {module-use.qdocinc} {building with cmake} {Qml}
44
45
To provide foreign QML type support for a non-QML library, locate
46
the \c QmlIntegration module as follows:
47
48
\snippet code/doc_src_qtqml.cmake 1
49
50
See \l{qt6_generate_foreign_qml_types} for details.
51
52
\section3 Building with qmake
53
54
\include {module-use.qdocinc} {building_with_qmake} {qml}
55
56
\section1 Registering QML Types and QML Modules
57
58
In order to register types for usage with QML you first need to define a
59
\l{Writing QML Modules}{QML module}, preferably using \l{qt_add_qml_module} in CMake.
60
Then, you can add C++ headers to your new module, and
61
\l{Defining QML Types from C++}{define types} to be
62
\l{Exposing Attributes of C++ Types to QML}{exposed to QML} in them.
63
64
\section1 Tweaking the engine
65
66
There are a number of knobs you can turn to customize the behavior of the QML engine.
67
The page on \l{Configuring the JavaScript Engine}{configuring the JavaScript engine}
68
lists the environment variables you may use to this effect. The description of the
69
\l{The QML Disk Cache}{QML Disk Cache} describes the options related to how your QML
70
components are compiled and loaded.
71
72
\section1 Articles and Guides
73
74
These articles contain information about Qt Qml.
75
76
\list
77
\li \l{The QML Reference}
78
\li \l{Qt Qml Tooling}
79
\li \l{Writing QML Modules}
80
\li \l{Singletons in QML}
81
\endlist
82
83
\section1 Reference
84
85
\list
86
\li \l {Qt Qml C++ Classes} {C++ Classes}
87
\li \l {Qt Qml QML Types} {QML Types}
88
\endlist
89
90
\section1 Licenses and Attributions
91
92
Qt Qml is available under commercial licenses from \l{The Qt Company}.
93
In addition, it is available under free software licenses. Since Qt 5.4,
94
these free software licenses are
95
\l{GNU Lesser General Public License, version 3}, or
96
the \l{GNU General Public License, version 2}.
97
See \l{Qt Licensing} for further details.
98
99
Furthermore Qt Qml in Qt \QtVersion may contain third party
100
modules under following permissive licenses:
101
102
\annotatedlist attributions-qtqml
103
104
*/
qtdeclarative
src
qml
doc
src
qtqml.qdoc
Generated on
for Qt by
1.14.0