diff options
Diffstat (limited to 'tests/auto/qmlls/qqmlcodemodel/data/sourceFolder/MyCppModule/helloworld.h')
-rw-r--r-- | tests/auto/qmlls/qqmlcodemodel/data/sourceFolder/MyCppModule/helloworld.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/qmlls/qqmlcodemodel/data/sourceFolder/MyCppModule/helloworld.h b/tests/auto/qmlls/qqmlcodemodel/data/sourceFolder/MyCppModule/helloworld.h new file mode 100644 index 0000000000..0a13344476 --- /dev/null +++ b/tests/auto/qmlls/qqmlcodemodel/data/sourceFolder/MyCppModule/helloworld.h @@ -0,0 +1,29 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef HELLOWORLD_H +#define HELLOWORLD_H + +#include <QObject> +#include <QQmlEngine> + +class HelloWorld : public QObject +{ + Q_OBJECT + QML_ELEMENT + Q_PROPERTY(int myP READ myP WRITE setMyP NOTIFY myPChanged FINAL) + Q_PROPERTY(int myPPP READ myP WRITE setMyP NOTIFY myPChanged FINAL) + +public: + explicit HelloWorld(QObject *parent = nullptr); + + int myP() { return m_myP; } + void setMyP(int p) { m_myP = p; } +private: + int m_myP; + +signals: + void myPChanged(); +}; + +#endif // HELLOWORLD_H |