blob: 82c71025cd705b5c3de75fea5dcb6e03200170ae (
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
|
// Copyright (C) 2013 Research In Motion.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtQml/QQmlExtensionPlugin>
#include <QtQml/qqml.h>
#include <qdebug.h>
class TestType : public QObject
{
Q_OBJECT
};
class TestPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
void registerTypes(const char *uri) override
{
Q_ASSERT(uri == QLatin1String("TestPlugin"));
qmlRegisterType<TestType>(uri, 1, 0, "TestTypePlugin");
}
};
#include "plugin.moc"
|