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
cppextensionpoints.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtquick-cppextensionpoints.html
6
\title C++ Extension Points Provided By Qt Quick
7
\brief Description of the C++ extension points provided by the Qt Quick module
8
9
All QML applications can be extended from C++ in order to use additional
10
functionality implemented in C++ code or to provide a C++ based QML plugin.
11
This topic of extending QML from C++ is covered in the
12
\l {Writing QML Extensions with C++} documentation.
13
14
Additionally, the Qt Quick module provides several extension and integration points for C++
15
developers, specific to this module. In particular, it allows C++ developers to create and register custom
16
QQuickItem-derived types which can be rendered by Qt Quick. It also provides
17
several scene graph-related classes which allow developers to define their own
18
rendering primitives.
19
20
\target user-defined-qquickitem-derived-types
21
\section1 User-Defined QQuickItem-Derived Types
22
23
While the Qt Quick module already provides a rich library of visual item types
24
for use in a QML application, some developers may wish to define their own
25
item-derived types in C++ and expose them to the QML type system. The easiest
26
way to do this is to subclass QQuickItem, which is the base type
27
for all visual types in the Qt Quick module. See the QQuickItem documentation
28
for more details.
29
30
\target scene-graph-related-classes
31
\section1 Scene Graph-Related Classes
32
33
Qt Quick 2 makes use of a dedicated scene graph based on graphics APIs such as
34
OpenGL ES, OpenGL, Vulkan, Metal, or Direct 3D for its rendering. Using a scene
35
graph for graphics rather than the traditional imperative painting systems
36
(QPainter and similar), means the scene to be rendered can be retained between
37
frames and the complete set of primitives to render is known before rendering
38
starts. This opens up for a number of optimizations, such as batching the
39
OpenGL draw calls to minimize state changes or discarding obscured primitives.
40
The \l {Qt Quick C++ Classes}{Qt Quick C++ API} provides various classes to
41
enable custom nodes to be created in C++. See the \l {Qt Quick Scene Graph}
42
documentation for details.
43
44
\target pixmap-and-threaded-image-support
45
\section1 Pixmap and Threaded Image Support
46
47
While the QML engine allows QML application to load images from filesystem or
48
network resources, some applications may require the additional option of
49
loading images from C++ based processes. This can be implemented through the
50
QQuickImageProvider class, which provides support for pixmap loading and
51
threaded image requests for QML applications. Any QML application that
52
requests an image through the special "image:" URL scheme will be directed
53
to an appropriate image provider to load the image.
54
55
For more information, see the QQuickImageProvider documentation.
56
57
*/
qtdeclarative
src
quick
doc
src
cppextensionpoints.qdoc
Generated on
for Qt by
1.14.0