diff --git a/src/app/main.cpp b/src/app/main.cpp index 04842be67..711379191 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -136,6 +136,9 @@ int main(int argc, char *argv[]) // Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty()) Application::setAttribute(Qt::AA_EnableHighDpiScaling, true); + // HighDPI scale factor policy must be set before QGuiApplication is created + if (qgetenv("QT_SCALE_FACTOR_ROUNDING_POLICY").isEmpty()) + Application::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif try {