aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/grouped
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/grouped')
-rw-r--r--examples/qml/referenceexamples/grouped/birthdayparty.h1
-rw-r--r--examples/qml/referenceexamples/grouped/grouped.pro4
-rw-r--r--examples/qml/referenceexamples/grouped/main.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/examples/qml/referenceexamples/grouped/birthdayparty.h b/examples/qml/referenceexamples/grouped/birthdayparty.h
index edaa11fa88..f6834dad89 100644
--- a/examples/qml/referenceexamples/grouped/birthdayparty.h
+++ b/examples/qml/referenceexamples/grouped/birthdayparty.h
@@ -60,6 +60,7 @@ class BirthdayParty : public QObject
Q_PROPERTY(Person *host READ host WRITE setHost)
Q_PROPERTY(QQmlListProperty<Person> guests READ guests)
Q_CLASSINFO("DefaultProperty", "guests")
+ QML_ELEMENT
public:
BirthdayParty(QObject *parent = nullptr);
diff --git a/examples/qml/referenceexamples/grouped/grouped.pro b/examples/qml/referenceexamples/grouped/grouped.pro
index ef66ea3e1d..1513ac552d 100644
--- a/examples/qml/referenceexamples/grouped/grouped.pro
+++ b/examples/qml/referenceexamples/grouped/grouped.pro
@@ -1,5 +1,9 @@
QT += qml
+CONFIG += qmltypes
+QML_IMPORT_NAME = People
+QML_IMPORT_MAJOR_VERSION = 1
+
SOURCES += main.cpp \
person.cpp \
birthdayparty.cpp
diff --git a/examples/qml/referenceexamples/grouped/main.cpp b/examples/qml/referenceexamples/grouped/main.cpp
index e233aab5b1..63dbe988a4 100644
--- a/examples/qml/referenceexamples/grouped/main.cpp
+++ b/examples/qml/referenceexamples/grouped/main.cpp
@@ -58,8 +58,6 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
- qmlRegisterTypesAndRevisions<BirthdayParty, ShoeDescription, Person, Boy, Girl>("People", 1);
-
QQmlEngine engine;
QQmlComponent component(&engine, QUrl("qrc:example.qml"));
auto *party = qobject_cast<BirthdayParty *>(component.create());