From 225e6da48b3303fcaeec9d21b98309f63492fa48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 21 Sep 2024 13:38:56 +0200 Subject: [PATCH] Use the "Round" HiDPI scaling policy (the default in Qt5) in Qt6 As of Qt 6.7.2 the rendering is completely broken and full of various render artifacts when the default "PassThrough" policy is used and the user has a fractional screen size like 125% set. --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 0bfce86a..edfefc27 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,6 +12,8 @@ int main(int argc, char *argv[]) qRegisterMetaTypeStreamOperators("TimeZoneInfo"); #else // QT6 qRegisterMetaType("TimeZoneInfo"); + QGuiApplication::setHighDpiScaleFactorRoundingPolicy( + Qt::HighDpiScaleFactorRoundingPolicy::Round); #endif // QT6 QSurfaceFormat fmt;