summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastien baudouin <sebastien.baudouin@windriver.com>2015-04-25 08:54:06 +0200
committerJames Thomas <james.thomas@codethink.co.uk>2015-05-11 12:22:19 +0000
commit3e5a3cbe215151278afbe1326aebedab170d779d (patch)
tree74e6dec50f70af67b98f654523895bc8424c68c6
parenta23d3ec3947e7604beb88f271da488f8c894aff2 (diff)
downloadgenivi-demo-platform-hmi-3e5a3cbe215151278afbe1326aebedab170d779d.tar.gz
launcher: Make Graphic working on Qemu machine
Those modifications are in theory not needed. But unfortunately without it Graphic is not working.
-rw-r--r--app/gdp-hmi-launcher/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/gdp-hmi-launcher/main.cpp b/app/gdp-hmi-launcher/main.cpp
index 412b094..ee61efd 100644
--- a/app/gdp-hmi-launcher/main.cpp
+++ b/app/gdp-hmi-launcher/main.cpp
@@ -19,6 +19,13 @@
#include <QApplication>
#include <QQuickView>
#include <QtDBus>
+
+//For QEMU
+#include <QScreen>
+#include <QQuickWindow>
+#include <QQuickItem>
+
+
#include <systemd/sd-journal.h>
#include "gdp-hmi-launcher.h"
@@ -45,6 +52,13 @@ int main(int argc, char *argv[])
&launcher, SLOT(hmiRequestOffSlot()));
view.setProperty("IVI-Surface-ID", GDP_LAUNCHER_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();
}