Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
4.8.3
-
None
-
openSUSE 12.2 x86-64, Qt 4.8.3, Xorg 7.6.
Description
Qt doesn't scale the widgets according to X11 DPI setting, but does so under Windows and OSX. You can see the code here:
http://qt.gitorious.net/qt/qt/blobs/4.8/src/gui/styles/qstylehelper.cpp
The function dpiScaled (in QStyleHelper namespace) returns correct results for the other windowing systems, but always returns 1.0 for X11, which is strange since the display resolution is readily available as qApp->desktop()->logicalDpiX().
This issue really prevents using high-DPI displays (like the new "retina" 220 dpi display) from being used with Qt applications under Linux/X11, and this is a huge shame. Even with standard displays it's sometimes desirable to run them at e.g. 150dpi, to relieve the eye strain, and this problem makes it painful.
I'm attaching 4 screenshots to demonstrate the problem - x11/192dpi, x11/96dpi, windows/192dpi, windows/96dpi. Pay particular attention to OK/Cancel buttons, MDI window titlebar, etc...
Thanks!