aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml/chapter2-methods
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2020-01-16 16:25:06 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-01-16 16:25:06 +0100
commit1d333d3375874efb8d37df37dc5ef561573794ad (patch)
tree2d8c995f64c05c84c1fcceb2c5cb40fcae69855f /examples/qml/tutorials/extending-qml/chapter2-methods
parentb106d86c433706928b0b0c206a0d9f831681e1bf (diff)
parente79a2658cde899d6ee11ec3c0d0a3768eb2c864b (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Diffstat (limited to 'examples/qml/tutorials/extending-qml/chapter2-methods')
-rw-r--r--examples/qml/tutorials/extending-qml/chapter2-methods/chapter2-methods.pro4
-rw-r--r--examples/qml/tutorials/extending-qml/chapter2-methods/main.cpp2
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"));