From a1f027a242d0c4088da12230a7145384ec5c344c Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 9 Feb 2022 20:49:11 +0600 Subject: [PATCH 1/2] qt: Set Application attributes before construction --- src/qt/qt_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index dc9935686..1bcf07cf6 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -129,11 +129,11 @@ main_thread_fn() } int main(int argc, char* argv[]) { - QApplication app(argc, argv); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - app.setAttribute(Qt::AA_UseHighDpiPixmaps); - app.setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif + QApplication app(argc, argv); qt_set_sequence_auto_mnemonic(false); Q_INIT_RESOURCE(qt_resources); Q_INIT_RESOURCE(qt_translations); From bd6c92c5923af73c5c8e35f339f5fbfa7976f00d Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 9 Feb 2022 20:57:58 +0600 Subject: [PATCH 2/2] qt: Don't disable HiDPI scaling at all --- src/qt/qt_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index 1bcf07cf6..ebeef8102 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -130,6 +130,7 @@ main_thread_fn() int main(int argc, char* argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, false); QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif