[Development] Qt 6 not seeing the same DPI as Qt 5

Thiago Macieira thiago.macieira at intel.com
Mon Nov 29 23:43:30 CET 2021


On Monday, 29 November 2021 13:20:58 PST Tor Arne Vestbø wrote:
> If you know that the physical DPI being reported is correct you can use
> QT_USE_PHYSICAL_DPI to override the behavior as documented.

I did, but that makes no difference:

$ QT_USE_PHYSICAL_DPI=1 ~/obj/qt/installed/bin/qtdiag | grep DPI
  QT_USE_PHYSICAL_DPI="1"
Screens: 2, High DPI scaling: active
  Physical DPI: 120.118,120 Logical DPI: 96,96 Subpixel_None
  High DPI scaling factor: 2 DevicePixelRatio: 2
  Physical DPI: 120.118,120 Logical DPI: 96,96 Subpixel_None
  High DPI scaling factor: 2 DevicePixelRatio: 2

> Sadly X doesn’t expose any per-monitor logical DPI. Some desktop
> environments solve it pretending like everything is rendered at 2x, with an
> Xft.dpi that matches, and then downscaling to the target monitor.

Yeah, I know. It would have helped me because of the rather different physical 
DPIs of the two monitors I use (laptop panel and external), but I can make do 
with something in-between the two.

And in my case, Wayland also has a problem for not supporting non-integer 
scale settings. 2x is too little (192 dpi) for the laptop panel and 3x (288 
dpi) is too much.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list