aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/extending/chapter2-methods/main.cpp')
-rw-r--r--examples/declarative/tutorials/extending/chapter2-methods/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
index 2ab2e2b8b9..4c11768e18 100644
--- a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
+++ b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp
@@ -39,8 +39,7 @@
****************************************************************************/
//![0]
#include "piechart.h"
-#include <qdeclarative.h>
-#include <QDeclarativeView>
+#include <QSGView>
#include <QApplication>
int main(int argc, char *argv[])
@@ -49,7 +48,8 @@ int main(int argc, char *argv[])
qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
- QDeclarativeView view;
+ QSGView view;
+ view.setResizeMode(QSGView::SizeRootObjectToView);
view.setSource(QUrl::fromLocalFile("app.qml"));
view.show();
return app.exec();