From 4b32d7699ae5879aeac95b2ffdf27555a00780bf Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sun, 18 Apr 2021 16:55:03 +0200 Subject: [PATCH] Set style for windows --- src/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a78f7ae2..82f1bcc2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,6 +45,21 @@ int main(int argc, char *argv[]) QQuickStyle::setStyle(QStringLiteral("Material")); #else QApplication app(argc, argv); + if(qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE")) { + QQuickStyle::setStyle(QStringLiteral("org.kde.desktop")); + } +#endif + +#ifdef Q_OS_WINDOWS + if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } + + QApplication::setStyle(QStringLiteral("breeze")); + auto font = app.font(); + font.setPointSize(10); + app.setFont(font); #endif QCoreApplication::setOrganizationName(QStringLiteral("KDE"));