Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlextensionplugin.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant
4
5
#
ifndef
QQMLEXTENSIONPLUGIN_H
6
#
define
QQMLEXTENSIONPLUGIN_H
7
8
#
include
<
QtCore
/
qplugin
.
h
>
9
#
include
<
QtCore
/
QUrl
>
10
#
include
<
QtQml
/
qqmlextensioninterface
.
h
>
11
12
#
if
defined
(
Q_CC_GHS
)
13
#
define
Q_GHS_KEEP_REFERENCE
(
S
)
QT_DO_PRAGMA
(
ghs
reference
S
##
__Fv
)
14
#
else
15
#
define
Q_GHS_KEEP_REFERENCE
(
S
)
16
#
endif
17
18
#
define
Q_IMPORT_QML_PLUGIN
(
PLUGIN
)
19
Q_IMPORT_PLUGIN
(
PLUGIN
)
20
21
QT_BEGIN_NAMESPACE
22
23
class
QQmlEngine;
24
class
QQmlExtensionPluginPrivate;
25
26
class
Q_QML_EXPORT
QQmlExtensionPlugin
27
:
public
QObject
28
,
public
QQmlExtensionInterface
29
{
30
Q_OBJECT
31
Q_DECLARE_PRIVATE(QQmlExtensionPlugin)
32
Q_INTERFACES(QQmlExtensionInterface)
33
Q_INTERFACES(QQmlTypesExtensionInterface)
34
public
:
35
explicit
QQmlExtensionPlugin(QObject *parent =
nullptr
);
36
~QQmlExtensionPlugin() override;
37
38
#
if
QT_DEPRECATED_SINCE
(
6
,
3
)
39
QT_DEPRECATED_VERSION_X_6_3(
"Provide a qmldir file to remove the need for calling baseUrl"
)
40
QUrl baseUrl()
const
;
41
#
endif
42
43
void
registerTypes(
const
char
*uri) override = 0;
44
virtual
void
unregisterTypes();
45
void
initializeEngine(QQmlEngine *engine,
const
char
*uri) override;
46
47
private
:
48
Q_DISABLE_COPY(QQmlExtensionPlugin)
49
};
50
51
class
Q_QML_EXPORT
QQmlEngineExtensionPlugin
52
:
public
QObject
53
,
public
QQmlEngineExtensionInterface
54
{
55
Q_OBJECT
56
Q_DISABLE_COPY_MOVE(QQmlEngineExtensionPlugin)
57
Q_INTERFACES(QQmlEngineExtensionInterface)
58
public
:
59
explicit
QQmlEngineExtensionPlugin(QObject *parent =
nullptr
);
60
~QQmlEngineExtensionPlugin() override;
61
void
initializeEngine(QQmlEngine *engine,
const
char
*uri) override;
62
};
63
64
QT_END_NAMESPACE
65
66
#
endif
// QQMLEXTENSIONPLUGIN_H
QQmlEngineExtensionPlugin
The QQmlEngineExtensionPlugin class provides an abstract base for custom QML extension plugins.
Definition
qqmlextensionplugin.h:54
QQmlExtensionPlugin
The QQmlExtensionPlugin class provides an abstract base for custom QML extension plugins with custom ...
Definition
qqmlextensionplugin.h:29
QtQuickSharedImagePlugin
Definition
qsharedimageplugin.cpp:13
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
qml
qml
qqmlextensionplugin.h
Generated on
for Qt by
1.18.0