From 790b3382a322235e4a9b97350834478407cc2cdc Mon Sep 17 00:00:00 2001 From: database64128 Date: Mon, 29 Jun 2020 10:48:59 +0800 Subject: [PATCH] Call `QGuiApplication::setHighDpiScaleFactorRoundingPolicy` to fix #2815 --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a2c757463b..36e05cdae0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -52,6 +52,9 @@ int main(int argc, char** argv) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); #endif +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); +#endif Application app(argc, argv); Application::setApplicationName("KeePassXC");