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
doc_src_qplugin.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QtPlugin>
5
6QT_BEGIN_NAMESPACE
7
8//! [0]
9namespace Foo
10{
11 struct MyInterface { /*...*/ };
12}
13
14Q_DECLARE_INTERFACE(Foo::MyInterface, "org.examples.MyInterface")
15//! [0]
16
17
18//! [1]
19class MyInstance : public QObject
20{
21 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDummyPlugin" FILE "mymetadata.json")
22};
23//! [1]
24
25
26//! [2]
27Q_IMPORT_PLUGIN(qjpeg)
28//! [2]
29
30QT_END_NAMESPACE