aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qtqml.qdoc
blob: 833436a67ca05148f624cf0ae291021be5d19706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page qtqml-index.html
\title Qt QML
\brief The Qt QML module defines and implements the QML language

The Qt QML module provides a framework for developing applications and libraries
with the \l{QML Applications}{QML language}. It defines and implements the
language and engine infrastructure, and provides an API to enable application
developers to extend the QML language with custom types and integrate QML code
with JavaScript and C++. The Qt QML module provides both a \l{Qt QML QML Types}
{QML API} and a \l{Qt QML C++ Classes}{C++ API}.

Note that while the Qt QML module provides the language and infrastructure
for QML applications, the \l{Qt Quick} module provides many visual components,
model-view support, an animation framework, and much more for building user
interfaces.

For those new to QML and Qt Quick, please see
\l{QML Applications}
for an introduction to writing QML applications.

\section1 Getting Started

To include the definitions of the module's classes, use the
following directive:

\code
#include <QtQml>
\endcode

The QML types in Qt QML are available through the \c QtQML import. To use the
types, add the following import statement to your .qml file:
\code
import QtQml 2.0
\endcode


To link against the module, add this line to your \l qmake \c
.pro file:

\code
QT += qml
\endcode

\section1 QML and QML Types

The Qt QML module contains the QML framework and important QML types used in
applications. The constructs of QML are described in the \l{The QML Reference}.

In addition to the \l{QML Basic Types}, the module comes with
the following QML object types:
\list
\li \l Component
\li \l QtObject
\li \l Binding
\li \l Connections
\li \l Timer
\endlist

The \l{QtQml::Qt}{Qt} global object provides useful enums and functions
for various QML types.

\section2 Lists and Models

New in Qt 5.1, the model types are moved to a submodule, \c QtQml.Models. The
\l{Qt QML Models QML Types}{Qt QML Models} page has more information.

\list
\li \l DelegateModel
\li \l DelegateModelGroup
\li \l ListElement
\li \l ListModel
\li \l ObjectModel
\endlist

\section1 JavaScript Environment for QML Applications

JavaScript expressions allow QML code to contain application logic. Qt QML
provides the framework for running JavaScript expressions in QML and from C++.

These sections are from \l{The QML Reference}.
    \list
    \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript}
    \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML}
    \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript}
    \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML}
    \li \l{qtqml-javascript-imports.html}{Importing JavaScript Resources In QML}
    \li \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment}
    \endlist

\section1 Integrating QML with C++ Applications

The module also provides the framework for running QML applications.
The QML framework allows QML code to contain JavaScript expressions and for
the QML code to interact with C++ code.

\list
\li \l{Important C++ Classes Provided By The Qt QML Module}
\li \l{Integrating QML and C++}
\endlist

\section1 Additional Frameworks
\list
\li \l{The Declarative State Machine Framework}
\endlist

\section1 Licenses and Attributions

Qt QML is available under commercial licenses from \l{The Qt Company}.
In addition, it is available under the
\l{GNU Lesser General Public License, version 3}, or
the \l{GNU General Public License, version 2}.
See \l{Qt Licensing} for further details.

Furthermore Qt QML potentially contains third party
modules under following permissive licenses:

\generatelist{groupsbymodule attributions-qtqml}

\section1 Guides and Other Information

Further information for writing QML applications:
\list
\li \l{The QML Reference}
\li \l{QML Applications}
    - essential information for application development with QML and Qt Quick
\li \l{Qt Quick} - a module which provides a set of QML types and C++ classes
    for building user interfaces and applications with QML
\endlist

\section2 Reference
\list
\li \l{Qt QML C++ Classes}{C++ Classes}
\li \l{Qt QML QML Types}{QML Types}
\li \l{Qt QML Examples}{Examples}
\endlist

*/