From 2c3419e127e55810da1741725b4ff39f118cd577 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 12 Sep 2019 17:03:52 +0200 Subject: Generate registrations for all examples Now that we can generate all QML type information at build time, we should also use it. Change-Id: I647c72bbe38fdb2deb565b75c86a696af3d15b61 Reviewed-by: Simon Hausmann --- .../extending-qml/chapter5-listproperties/chapter5-listproperties.pro | 4 ++++ examples/qml/tutorials/extending-qml/chapter5-listproperties/main.cpp | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/qml/tutorials/extending-qml/chapter5-listproperties') diff --git a/examples/qml/tutorials/extending-qml/chapter5-listproperties/chapter5-listproperties.pro b/examples/qml/tutorials/extending-qml/chapter5-listproperties/chapter5-listproperties.pro index 67d1cd35c3..edbd3c237d 100644 --- a/examples/qml/tutorials/extending-qml/chapter5-listproperties/chapter5-listproperties.pro +++ b/examples/qml/tutorials/extending-qml/chapter5-listproperties/chapter5-listproperties.pro @@ -1,5 +1,9 @@ QT += qml quick +CONFIG += qmltypes +QML_IMPORT_NAME = Charts +QML_IMPORT_MAJOR_VERSION = 1 + HEADERS += piechart.h \ pieslice.h SOURCES += piechart.cpp \ diff --git a/examples/qml/tutorials/extending-qml/chapter5-listproperties/main.cpp b/examples/qml/tutorials/extending-qml/chapter5-listproperties/main.cpp index 70ef103e4d..7262969b62 100644 --- a/examples/qml/tutorials/extending-qml/chapter5-listproperties/main.cpp +++ b/examples/qml/tutorials/extending-qml/chapter5-listproperties/main.cpp @@ -57,8 +57,6 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - qmlRegisterTypesAndRevisions("Charts", 1); - QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl("qrc:///app.qml")); -- cgit v1.2.3