Details
-
Bug
-
Resolution: Out of scope
-
P5: Not important
-
None
-
5.10.0
-
None
Description
My application runs on windows 10 with Increased font sizes (125%) and scaling (150%) and after setting QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); it scales inadequate in windows because all sizes are multiplied by two even when I have a monitor with 72 DPI.
qDebug() << QGuiApplication::primaryScreen()->logicalDotsPerInch();
shows 72
still in QML
Screen.devicePixelRatio is 2
I tried
qputenv("QT_SCALE_FACTOR", QByteArray("0.5")); // it just scales whole app and does not affect scaling coefficients inside
i also tried adding qt.conf with
[Platforms]
WindowsArguments = dpiawareness=2
and it make no effect at all
It means that setAttribute(Qt::AA_EnableHighDpiScaling) is just useless for desktops as it for some reason takes in account windows scaling.
And developers have to use old method with calculating coefficients for each explicit size in app like font.pixelSize: 12 * hlpr.dpF