summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastien baudouin <sebastien.baudouin@windriver.com>2015-04-27 08:57:34 +0200
committerJames Thomas <james.thomas@codethink.co.uk>2015-05-11 12:21:32 +0000
commita23d3ec3947e7604beb88f271da488f8c894aff2 (patch)
tree8a37e269454247274db8651d40077a312afe40b2
parent3132ffeee8a496223d0ebc2474585c0937835085 (diff)
downloadgenivi-demo-platform-hmi-a23d3ec3947e7604beb88f271da488f8c894aff2.tar.gz
qml_example: Make Graphic working on Qemu machine
Those modification are in theory not needed but unfortunately without it the graphic is not working.
-rw-r--r--app/qml-example/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/qml-example/main.cpp b/app/qml-example/main.cpp
index 9414896..a60213b 100644
--- a/app/qml-example/main.cpp
+++ b/app/qml-example/main.cpp
@@ -18,6 +18,12 @@
#include <QApplication>
#include <QQuickView>
+
+//For QEMU
+#include <QScreen>
+#include <QQuickWindow>
+#include <QQuickItem>
+
#include <systemd/sd-journal.h>
#include "main.h"
@@ -41,6 +47,13 @@ int main(int argc, char *argv[])
&myClass, SLOT(cppSlot(QString)));
view.setProperty("IVI-Surface-ID", QML_EXAMPLE_SURFACE_ID);
+
+ //For QEMU only
+ QSize size = app.primaryScreen()->size();
+ view.showFullScreen();
+ view.rootObject()->setWidth(size.width());
+ view.rootObject()->setHeight(size.height());
+
view.show();
return app.exec();