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