Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
Why it is needed?
In some cases when AA_EnableHighDpiScaling is enabled, Qt automatically changes the DPR scale for the window according to the screen DPR. The software developer is unable to set it on its own - independently from the Qt.
Use cases:
- override automatically set of DPR,
- allow the application to behave the same way on all platforms,
- allow to set the DPR manually avoiding automatic changes when resolution/screen changes,
- avoid possible auto-dpr bugs,
Usage proposal:
auto w = new QWindow;
...
w->setDevicePixelRatio(2.0);
What happens:
- AA_EnableHighDpiScaling is ignored for this window,
- window is permanently set to DPR of 2.0,