[Gui] fix HiDPI rounding bug

As reported in https://forum.freecadweb.org/viewtopic.php?f=10&t=56425&start=20#p485809
this PR fixes the problem reported here: https://forum.freecadweb.org/viewtopic.php?f=10&t=56425&start=20#p485759
This commit is contained in:
donovaly
2021-03-10 15:23:33 +01:00
committed by wwmayer
parent 159a71bba7
commit f4574cf02d
+3
View File
@@ -1937,6 +1937,9 @@ void Application::runApplication(void)
else {
// Enable automatic scaling based on pixel density of display (added in Qt 5.6)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
}
#endif // QT_VERSION >= 0x050600