aboutsummaryrefslogtreecommitdiffstats
path: root/examples/shared
diff options
context:
space:
mode:
authorFabian Bumberger <fbumberger@rim.com>2012-11-15 13:47:24 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-20 18:11:18 +0100
commitdea27f3421e29a54add2fdab2424529f77535def (patch)
treef46f16480674181c9dd21a0816e78ec731647f6b /examples/shared
parent6c1d43060af15b2f80487d9982f5ef8423cfed8b (diff)
Refactoring samegame
This patch cleans up the example and makes it more customizeable by adding a setting file. Also a bug has been fixed, where the "New game" button could not been clicked. Change-Id: Ia397258721dfcf4900e3ed1e176a257eccfad354 Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
Diffstat (limited to 'examples/shared')
-rw-r--r--examples/shared/shared.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/shared/shared.h b/examples/shared/shared.h
index e725f8146b..7fd2f08a40 100644
--- a/examples/shared/shared.h
+++ b/examples/shared/shared.h
@@ -70,7 +70,13 @@
return -1;\
}\
view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\
- view.setSource(QUrl::fromLocalFile(fileName));\
- view.show();\
+ view.setSource(QUrl::fromLocalFile(fileName)); \
+ if (QGuiApplication::platformName() == QLatin1String("qnx") || \
+ QGuiApplication::platformName() == QLatin1String("eglfs")) {\
+ view.setResizeMode(QQuickView::SizeRootObjectToView);\
+ view.showFullScreen();\
+ } else {\
+ view.show();\
+ }\
return app.exec();\
}