diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-09-12 17:03:52 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-13 16:47:57 +0100 |
commit | 2c3419e127e55810da1741725b4ff39f118cd577 (patch) | |
tree | 670ec93d28dadad06bd840a5694935ef8a7b2ac0 /examples/qml/tutorials/extending-qml/chapter2-methods | |
parent | 4eff7299501ff932071300b3fa34fbeccb03d0d8 (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'examples/qml/tutorials/extending-qml/chapter2-methods')
-rw-r--r-- | examples/qml/tutorials/extending-qml/chapter2-methods/chapter2-methods.pro | 4 | ||||
-rw-r--r-- | examples/qml/tutorials/extending-qml/chapter2-methods/main.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/qml/tutorials/extending-qml/chapter2-methods/chapter2-methods.pro b/examples/qml/tutorials/extending-qml/chapter2-methods/chapter2-methods.pro index 7fd850ce36..264f028f5c 100644 --- a/examples/qml/tutorials/extending-qml/chapter2-methods/chapter2-methods.pro +++ b/examples/qml/tutorials/extending-qml/chapter2-methods/chapter2-methods.pro @@ -1,5 +1,9 @@ QT += qml quick +CONFIG += qmltypes +QML_IMPORT_NAME = Charts +QML_IMPORT_MAJOR_VERSION = 1 + HEADERS += piechart.h SOURCES += piechart.cpp \ main.cpp diff --git a/examples/qml/tutorials/extending-qml/chapter2-methods/main.cpp b/examples/qml/tutorials/extending-qml/chapter2-methods/main.cpp index af50cc14f2..10df9c2566 100644 --- a/examples/qml/tutorials/extending-qml/chapter2-methods/main.cpp +++ b/examples/qml/tutorials/extending-qml/chapter2-methods/main.cpp @@ -56,8 +56,6 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - qmlRegisterTypesAndRevisions<PieChart>("Charts", 1); - QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl("qrc:///app.qml")); |