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
qqmlmetamoduleregistration.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
4#include <private/qtqmlglobal_p.h>
6#include <qqml.h>
7
9
10// Provide the type registration for QtQml here, in libQtQml.so.
11// This way we get a completely functional QtQml module and don't have to
12// rely on the plugin to be loaded.
13// In CMakeLists.txt we've specified NO_GENERATE_QMLTYPES to prevent
14// the generation of an extra type registration file.
15Q_QML_EXPORT void qml_register_types_QtQml()
16{
17 // ### Qt7: Handle version 6 like version 2.
18 qmlRegisterModule("QtQml", 2, 0);
19 qmlRegisterModule("QtQml", 2, 254);
20 qmlRegisterModule("QtQml", QT_VERSION_MAJOR, 0);
21 qmlRegisterModule("QtQml", QT_VERSION_MAJOR, QT_VERSION_MINOR);
22}
23
25
Combined button and popup list for selecting options.
void qmlRegisterModule(const char *uri, int versionMajor, int versionMinor)
Definition qqml.cpp:245
static const QQmlModuleRegistration registration("QtQml", qml_register_types_QtQml)
QT_BEGIN_NAMESPACE Q_QML_EXPORT void qml_register_types_QtQml()