projects
/
profile
/
ivi
/
qtdeclarative.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update extension tutorials and examples to QtQuick2
[profile/ivi/qtdeclarative.git]
/
examples
/
declarative
/
tutorials
/
extending
/
chapter1-basics
/
main.cpp
diff --git
a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp
b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp
index
2ab2e2b
..
4c11768
100644
(file)
--- a/
examples/declarative/tutorials/extending/chapter1-basics/main.cpp
+++ b/
examples/declarative/tutorials/extending/chapter1-basics/main.cpp
@@
-39,8
+39,7
@@
****************************************************************************/
//![0]
#include "piechart.h"
****************************************************************************/
//![0]
#include "piechart.h"
-#include <qdeclarative.h>
-#include <QDeclarativeView>
+#include <QSGView>
#include <QApplication>
int main(int argc, char *argv[])
#include <QApplication>
int main(int argc, char *argv[])
@@
-49,7
+48,8
@@
int main(int argc, char *argv[])
qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
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();
view.setSource(QUrl::fromLocalFile("app.qml"));
view.show();
return app.exec();