[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 01:32:46 +01:00
committed by wmayer
parent ee6222d216
commit 7b4fdf3e7c

View File

@@ -1818,6 +1818,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
}
//Enable support for highres images (added in Qt 5.1, but off by default)