aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp')
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
index dcb3481ac1..1113cc55cb 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp
@@ -40,8 +40,7 @@
#include "piechart.h"
#include "pieslice.h"
-#include <qdeclarative.h>
-#include <QDeclarativeView>
+#include <QSGView>
#include <QApplication>
//![0]
@@ -56,7 +55,8 @@ int main(int argc, char *argv[])
qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice");
//![1]
- QDeclarativeView view;
+ QSGView view;
+ view.setResizeMode(QSGView::SizeRootObjectToView);
view.setSource(QUrl::fromLocalFile("app.qml"));
view.show();
return app.exec();