diff options
| author | Arthur LAURENT <[email protected]> | 2022-06-09 23:58:46 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-06-09 23:58:46 +0200 |
| commit | 7b9a4f0ce02fc059e76fa9cba90425fd75f0326e (patch) | |
| tree | e74bf06063f2daaf5b7f6ebc5a98a257c0c8745a /tests/projects/qt/quickplugin/src/Foo.h | |
| parent | 50f55f6e0e7ce6a5474fb5dd784c90321371396c (diff) | |
Add qt.quickplugin test
Diffstat (limited to 'tests/projects/qt/quickplugin/src/Foo.h')
| -rw-r--r-- | tests/projects/qt/quickplugin/src/Foo.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/projects/qt/quickplugin/src/Foo.h b/tests/projects/qt/quickplugin/src/Foo.h new file mode 100644 index 000000000..71e2b0e23 --- /dev/null +++ b/tests/projects/qt/quickplugin/src/Foo.h @@ -0,0 +1,22 @@ +#include <QtCore/QObject> +#include <QtQml/qqml.h> + +class Foo: public QObject { + Q_OBJECT + Q_PROPERTY(int bar READ bar WRITE setBar NOTIFY barChanged) + QML_NAMED_ELEMENT(Foo) + + public: + explicit Foo(QObject *parent = nullptr); + + int bar() const noexcept; + void setBar(int bar) noexcept; + + Q_SIGNALS: + void barChanged(int bar); + + private: + int m_bar; +}; + +QML_DECLARE_TYPE(Foo) |
