aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h')
-rw-r--r--sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h b/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
new file mode 100644
index 000000000..0b6a0b95c
--- /dev/null
+++ b/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
@@ -0,0 +1,27 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QPYQMLPROPERTYVALUESOURCE_H
+#define QPYQMLPROPERTYVALUESOURCE_H
+
+#include <QtQml/QQmlPropertyValueSource>
+
+#ifdef Q_MOC_RUN
+Q_DECLARE_INTERFACE(QQmlPropertyValueSource, "org.qt-project.Qt.QQmlPropertyValueSource")
+#endif
+
+QT_BEGIN_NAMESPACE
+
+// Inherit from QObject such that QQmlPropertyValueSource can be found at
+// a fixed offset (RegisterType::valueSourceCast).
+class QPyQmlPropertyValueSource : public QObject, public QQmlPropertyValueSource
+{
+ Q_OBJECT
+ Q_INTERFACES(QQmlPropertyValueSource)
+public:
+ explicit QPyQmlPropertyValueSource(QObject *parent = nullptr) : QObject(parent) {}
+};
+
+QT_END_NAMESPACE
+
+#endif // QPYQMLPROPERTYVALUESOURCE_H