summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index 713fd53cd..fdcae2c77 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -9,7 +9,9 @@
#include <QDesktopWidget>
#include <QNetworkProxy>
#include <QLibraryInfo>
-#include <QTextCodec>
+
+#include <QQuickWindow>
+#include <QQmlApplicationEngine>
#include "qt-gui.h"
@@ -28,7 +30,15 @@ void init_ui()
void run_ui()
{
+#ifdef SUBSURFACE_MOBILE
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
+ QObject *mainWindow = engine.rootObjects().value(0);
+ QQuickWindow *qml_window = qobject_cast<QQuickWindow *>(mainWindow);
+ qml_window->show();
+#else
window->show();
+#endif
qApp->exec();
}