aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/qtquick.qdoc
blob: 49bd7c5ac11f29dbb64718569b8ef25426b82d83 (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
/****************************************************************************
**
** 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 qtquick-index.html
\title Qt Quick
\brief The Qt Quick module implements the "standard library" for QML

The Qt Quick module is the standard library for writing QML applications.
While the \l{Qt QML} module provides the QML engine and
language infrastructure, the Qt Quick module provides all the basic
types necessary for creating user interfaces with QML. It
provides a visual canvas and includes types for creating and animating
visual components, receiving user input, creating data models and views
and delayed object instantiation.

The Qt Quick module provides both a \l{Qt Quick QML Types}{QML API} which supplies
QML types for creating user interfaces with the QML language, and a
\l{Qt Quick C++ Classes}{C++ API} for extending QML applications with C++ code.

\note A set of Qt Quick-based UI controls is also available to create user
interfaces. See \l{Qt Quick Controls} for more information.

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

\section1 Using the Module

\section2 QML API

The QML types in Qt Quick are available through the \c QtQuick import. To use the
types, add the following import statement to your .qml file:

\qml
import QtQml
\endqml

\section2 C++ API

Using the \l{Qt Quick C++ Classes}{C++ API} requires linking against the module
library, either directly or through other dependencies. Several build tools
have dedicated support for this, including \l{CMake Documentation}{CMake} and
\l{qmake}.

\section3 Building with CMake

Use the \c find_package() command to locate the needed module components in the
Qt6 package:

\snippet code/doc_src_qtquick.cmake 0

See also the \l{Build with CMake} overview.

\section3 Building with qmake

To configure the module for building with qmake, add the module as a value of
the QT variable in the project's .pro file:

\snippet code/doc_src_qtquick.pro 0

\section1 Important Concepts in Qt Quick

Qt Quick provides everything needed to create a rich application with a fluid
and dynamic user interface. It enables user interfaces to be built around the
behavior of user interface components and how they connect with one another,
and it provides a visual canvas with its own coordinate system and rendering
engine. Animation and transition effects are a first class concept in Qt Quick,
and visual effects can be supplemented through specialized components for
particle and shader effects.

\list
\li \l{Important Concepts In Qt Quick - The Visual Canvas}{The Visual Canvas}
\li \l{Important Concepts In Qt Quick - User Input}{User Input}
\li \l{Important Concepts In Qt Quick - Positioning}{Positioning}
\li \l{Important Concepts in Qt Quick - States, Transitions and Animations}{States, Transitions And Animations}
\li \l{Important Concepts In Qt Quick - Data - Models, Views and Data Storage}{Data - Models, Views and Data Storage}
\li \l{Important Concepts In Qt Quick - Graphical Effects}{Particles And Graphical Effects}
\li \l{Important Concepts In Qt Quick - Convenience Types}{Convenience Types}
\endlist

When using the \c QtQuick module, you will need to know how to write QML
applications using the QML language. In particular, QML Basics and QML
Essentials from the \l{QML Applications} page.

To find out more about using the QML language, see the \l{Qt QML} module documentation.

\section1 C++ Extension Points

\list
    \li \l{C++ Extension Points Provided By Qt Quick}{C++ Extension Points}
        \list
        \li \l{user-defined-qquickitem-derived-types}{Creating User-Defined QQuickItem-Derived Types}
        \li \l{scene-graph-related-classes}{Scene Graph-Related Classes}
        \li \l{pixmap-and-threaded-image-support}{Pixmap and Threaded Image Support}
        \endlist
\endlist

\section1 Licenses and Attributions

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

\section1 Reference Documentation

Additional Qt Quick information:
\list
\li \l{Qt Quick C++ Classes} - the C++ API provided by the
    Qt Quick module
\li \l{Qt Quick QML Types} - a list of QML types provided by the
    \c{QtQuick} import
    \list
    \li \l{Qt Quick Local Storage QML Types}{Local Storage} - a submodule
    containing a JavaScript interface for an SQLite database
    \li \l{Qt Quick Particles QML Types}{Particles} - provides a particle
    system for Qt Quick
    \li \l{Qt Quick Layouts}{Layouts} - provides layouts for arranging Qt Quick items
    \li \l{Qt Quick Test QML Types}{Tests} - contains types for writing unit test for a QML application
    \endlist
\li \l{Qt Quick Examples and Tutorials}
\li \l{Best Practices for QML and Qt Quick}{Qt Quick Guidelines}
\endlist

Further information for writing QML applications:
\list
\li \l{QML Applications}
    - essential information for application development with QML and Qt Quick
\li \l{Qt QML} - documentation for the
    Qt QML module, which provides the QML engine and language infrastructure
\endlist
*/