aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-01-13 12:49:05 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-01-13 13:27:36 +0100
commit4eff7299501ff932071300b3fa34fbeccb03d0d8 (patch)
tree091f69291a2cc295947208d2640ec4ed2bdda81c /examples/qml
parente5570eecd3a4fc61020d28699169707a2c1f5dc9 (diff)
Binding example: Fix type registration
Fixes: QTBUG-81335 Change-Id: Ie93c9b7ad49703bce245592e659ccdb6ea2b7ed9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'examples/qml')
-rw-r--r--examples/qml/referenceexamples/binding/happybirthdaysong.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/qml/referenceexamples/binding/happybirthdaysong.h b/examples/qml/referenceexamples/binding/happybirthdaysong.h
index dcfebc06ba..a1582f0d4b 100644
--- a/examples/qml/referenceexamples/binding/happybirthdaysong.h
+++ b/examples/qml/referenceexamples/binding/happybirthdaysong.h
@@ -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);