Binding example: Fix type registration
Fixes: QTBUG-81335 Change-Id: Ie93c9b7ad49703bce245592e659ccdb6ea2b7ed9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
e5570eecd3
commit
4eff729950
|
@ -52,6 +52,7 @@
|
|||
|
||||
#include <QQmlPropertyValueSource>
|
||||
#include <QQmlProperty>
|
||||
#include <qqml.h>
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
|
@ -60,6 +61,7 @@ class HappyBirthdaySong : public QObject, public QQmlPropertyValueSource
|
|||
Q_OBJECT
|
||||
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
|
||||
Q_INTERFACES(QQmlPropertyValueSource)
|
||||
QML_ELEMENT
|
||||
public:
|
||||
HappyBirthdaySong(QObject *parent = nullptr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue