aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/cppextensionpoints.qdoc
blob: 5d4240ceb5cac2b184ab31761aa22b6aabafb007 (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
/****************************************************************************
**
** 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-cppextensionpoints.html
\title C++ Extension Points Provided By Qt Quick
\brief Description of the C++ extension points provided by the Qt Quick module

All QML applications can be extended from C++ in order to use additional
functionality implemented in C++ code or to provide a C++ based QML plugin.
This topic of extending QML from C++ is covered in the \l {Integrating QML and C++}
documentation.

Additionally, the Qt Quick module provides several extension and integration points for C++
developers, specific to this module. In particular, it allows C++ developers to create and register custom
QQuickItem-derived types which can be rendered by Qt Quick.  It also provides
several scene graph-related classes which allow developers to define their own
rendering primitives.

\target user-defined-qquickitem-derived-types
\section1 User-Defined QQuickItem-Derived Types

While the Qt Quick module already provides a rich library of visual item types
for use in a QML application, some developers may wish to define their own
item-derived types in C++ and expose them to the QML type system. The easiest
way to do this is to subclass QQuickItem, which is the base type
for all visual types in the Qt Quick module. See the QQuickItem documentation
for more details.

\target scene-graph-related-classes
\section1 Scene Graph-Related Classes

Qt Quick 2 makes use of a dedicated scene graph based on OpenGL ES 2.0 or OpenGL 2.0
for its rendering. Using a scene graph for graphics rather than the traditional imperative
painting systems (QPainter and similar), means the scene to be rendered can be retained
between frames and the complete set of primitives to render is known before rendering
starts. This opens up for a number of optimizations, such as batching the OpenGL draw calls
to minimize state changes or discarding obscured primitives.

The \l {Qt Quick C++ Classes}{Qt Quick C++ API} provides various classes to
enable custom nodes to be created in C++.

See the \l {Qt Quick Scene Graph} documentation for details.

\target pixmap-and-threaded-image-support
\section1 Pixmap and Threaded Image Support

While the QML engine allows QML application to load images from filesystem or
network resources, some applications may require the additional option of
loading images from C++ based processes. This can be implemented through the
QQuickImageProvider class, which provides support for pixmap loading and
threaded image requests for QML applications. Any QML application that
requests an image through the special "image:" URL scheme will be directed
to an appropriate image provider to load the image.

For more information, see the QQuickImageProvider documentation.

*/