From 9e4a1f3ace5b1bdca4cde1285b2490e0ed08b327 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sun, 6 Oct 2019 09:10:38 +0200 Subject: [PATCH] Fix icon --- ScreenPlay/main.cpp | 9 ++++++++- ScreenPlay/main.qml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ScreenPlay/main.cpp b/ScreenPlay/main.cpp index b8ecdc1e..5b27f302 100644 --- a/ScreenPlay/main.cpp +++ b/ScreenPlay/main.cpp @@ -1,11 +1,18 @@ -#include "app.h" #include +#include #include +#include "app.h" + int main(int argc, char* argv[]) { + + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication qtGuiApp(argc, argv); + QGuiApplication::setWindowIcon(QIcon(":/assets/icons/favicon.ico")); + qmlRegisterSingletonType("ScreenPlay", 1, 0, "ScreenPlay", [](QQmlEngine* engine, QJSEngine*) -> QObject* { engine->setObjectOwnership(App::instance(), QQmlEngine::ObjectOwnership::CppOwnership); return App::instance(); diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml index a47f7ff1..912a3293 100644 --- a/ScreenPlay/main.qml +++ b/ScreenPlay/main.qml @@ -16,7 +16,7 @@ import "qml/Navigation" ApplicationWindow { id: window color: "#eeeeee" - // Set visible if the -silent parameter was not set (see main.cpp:87). + // Set visible if the -silent parameter was not set (see main.cpp:19). visible: false width: 1400 height: 788