diff options
-rw-r--r-- | app/Dashboard.qml | 9 | ||||
-rw-r--r-- | app/app.pro | 2 | ||||
-rw-r--r-- | app/main.cpp | 14 | ||||
-rw-r--r-- | package/config.xml | 1 |
4 files changed, 14 insertions, 12 deletions
diff --git a/app/Dashboard.qml b/app/Dashboard.qml index 7371667..a21bf6c 100644 --- a/app/Dashboard.qml +++ b/app/Dashboard.qml @@ -20,6 +20,8 @@ import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 import Translator 1.0 +import QtQuick.Window 2.13 + ApplicationWindow { id: root @@ -54,9 +56,10 @@ ApplicationWindow { Item { id: container anchors.centerIn: parent - width: 1080 - height: 1487 - scale: screenInfo.scale_factor() + width: Screen.width + height: Screen.height + //scale: screenInfo.scale_factor() + scale: 1 Label { id: speed diff --git a/app/app.pro b/app/app.pro index eb10738..00a2261 100644 --- a/app/app.pro +++ b/app/app.pro @@ -1,5 +1,5 @@ TARGET = dashboard -QT = quick aglextras +QT = quick HEADERS += \ translator.h diff --git a/app/main.cpp b/app/main.cpp index d1486c5..2eef1b0 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -15,20 +15,20 @@ * limitations under the License. */ -#include <QtAGLExtras/AGLApplication> +#include <QGuiApplication> #include <QtQml/QQmlApplicationEngine> #include <QtQml/QQmlContext> +#include <QtGui/QGuiApplication> #include <signalcomposer.h> #include "translator.h" int main(int argc, char *argv[]) { - AGLApplication app(argc, argv); - app.setApplicationName("Dashboard"); - app.setupApplicationRole("dashboard"); + QGuiApplication app(argc, argv); + app.setDesktopFileName("dashboard"); - QQmlApplicationEngine *engine = app.getQmlApplicationEngine(); - QQmlContext *context = engine->rootContext(); + QQmlApplicationEngine engine; + QQmlContext *context = engine.rootContext(); QVariant v = context->contextProperty(QStringLiteral("bindingAddress")); if(v.canConvert(QMetaType::QUrl)) { QUrl bindingAddress = v.toUrl(); @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) qCritical("Cannot find bindingAddress property in context, SignalComposer unavailable"); } qmlRegisterType<Translator>("Translator", 1, 0, "Translator"); - app.load(QUrl(QStringLiteral("qrc:/Dashboard.qml"))); + engine.load(QUrl(QStringLiteral("qrc:/Dashboard.qml"))); return app.exec(); } diff --git a/package/config.xml b/package/config.xml index 193c62e..4c8bd2d 100644 --- a/package/config.xml +++ b/package/config.xml @@ -7,7 +7,6 @@ <author>Qt</author> <license>APL 2.0</license> <feature name="urn:AGL:widget:required-api"> - <param name="windowmanager" value="ws"/> <param name="homescreen" value="ws"/> <param name="signal-composer" value="ws"/> </feature> |