aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/qpyqmlpropertyvaluesource.h
blob: 0b6a0b95ce453c355cc91bc5ddb64b3bc5620853 (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
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