// Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef WithBindableProperties_H #define WithBindableProperties_H #include #include #include class WithBindableProperties : public QObject { Q_OBJECT QML_ELEMENT Q_PROPERTY(int a READ a WRITE setA BINDABLE bindableA) Q_PROPERTY(int b READ b WRITE setB BINDABLE bindableB) public: QProperty m_a; QProperty m_b; int a() {return m_a;} int b() {return m_b;} void setA(int val) {m_a = val;} void setB(int val) {m_b = val;} QBindable bindableA() {return QBindable(&m_a); } QBindable bindableB() {return QBindable(&m_b); } }; #endif