summaryrefslogtreecommitdiff
path: root/src/qml/doc/snippets/code/backend/backend.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-02-11 16:49:55 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-12 15:46:01 +0100
commitc70452a65af222343451f19ec62744314444c181 (patch)
tree10b5d1ed21b39deb82427ed12155920b7c643988 /src/qml/doc/snippets/code/backend/backend.h
parentb9fcb1d4543fe19962b4cf8dcdb45c6c497e39d8 (diff)
downloadqtdeclarative-c70452a65af222343451f19ec62744314444c181.tar.gz
Doc: Modernize backend example and adapt C++ integration docs
We want people to use the static type registration. Change-Id: I98e51af9df1a2f73df10f82458a7b7f5c5e5aad1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qml/doc/snippets/code/backend/backend.h')
-rw-r--r--src/qml/doc/snippets/code/backend/backend.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/doc/snippets/code/backend/backend.h b/src/qml/doc/snippets/code/backend/backend.h
index fa7ce9eb86..6c64236bc7 100644
--- a/src/qml/doc/snippets/code/backend/backend.h
+++ b/src/qml/doc/snippets/code/backend/backend.h
@@ -53,11 +53,13 @@
#include <QObject>
#include <QString>
+#include <qqml.h>
class BackEnd : public QObject
{
Q_OBJECT
Q_PROPERTY(QString userName READ userName WRITE setUserName NOTIFY userNameChanged)
+ QML_ELEMENT
public:
explicit BackEnd(QObject *parent = nullptr);