[Development] Revisiting high-DPI configuration options

Thiago Macieira thiago.macieira at intel.com
Fri Jun 17 22:49:59 CEST 2016


> - Run "./highdpi --metrics", or test with an application.

See 3 scenarios attached. I'll send a fourth scenario later, when I try at 
home with my 45" TV that reports its size as 160 x 90 mm.

Software scaling (scenario 3) is achieved with:
$ xrandr --output DP-1 --mode 1920x1080 --scale 2x2 --panning 3840x2160+3200+0

Note that 3840x2160 = 2 * 1920x1080 and 3200 is the width of my left (HighDPI) 
monitor.

> - X11: Check if using the logical or physical DPI works for your displays
>    QT_AUTO_SCREEN_SCALE_FACTOR=1 QT_USE_PHYSICAL_DPI=0|1 ./highdpi
> --metrics

See above.
 
> - X11/Windows: Test how fractional scale factors work (if applicable)
>    QT_AUTO_SCREEN_SCALE_FACTOR=1 QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough
> ./applicaiton
 
> - X11 (mostly): Are you using non-Qt applications on the high-DPI displays?
> How do you configure them?

Yes. Chromium and Firefox apparently configured themselves, after I set the X 
DPI (X is started with the option -dpi 216). I tried an extension to Firefox, 
but it wasn't necessary and only made things worse. I didn't try to restart X 
without the -dpi option, I only used xrandr to set it back to 96 when I 
calculated Scenario 2, so YMMV.

For other GTK applications, I had to set the environment:

$ cat ~/.config/plasma-workspace/env/var.sh
export CLUTTER_SCALE=2
export GDK_SCALE=2
export QT_MESSAGE_PATTERN='[%{time boot}] %{appname}(%{pid} %{threadid}):%{if-
category} %{category}:%{endif}    %{message}'
export QT_SCREEN_SCALE_FACTORS='2;2'

For Qt 4 applications still left in the system, the only thing that worked was 
setting the X DPI to 216. The value 216 is lower than the actual screen DPI, 
but provides a reasonable experience. It was trial and error. Also, 216/96 = 
2.25, which should help with rounding down.

All non-Qt apps only work in Scenario 3 (software scaling of the external 
monitor). In Scenario 1 with QT_SCREEN_SCALE_FACTORS='2;1', Qt 5.6+ apps work 
fine, but non-Qt apps look huge on the external, normal-DPI monitor.

Creator is also a bad citizen (worst of all Qt 5 applications I've tested), 
but I did not test it again in the scenarios above. When I tested before, I 
had to find the right combination that would make both the QML and non-QML 
parts of the UI look reasonable. Under some configurations, the text editor was 
the right size but the Welcome screen, the left and bottom panels would look 
too big, etc.

> As before, QT_SCALE_FACTOR can be used to set any scale factor for testing,
> and  QT_FONT_DPI can be use the set the logical DPI (now expanded to work
> on Windows and macOS in addition to X11).

But you apparently removed the ability to set the scaling per-monitor. So this 
brings Qt back on par with other X11 HiDPI-aware applications. Hence the reply 
I get from everyone: use Wayland.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
== Scenario 1 ==
* High-DPI laptop screen, regular DPI external monitor
* No X scaling
* Monitors report correct size

eDP-1 connected primary 3200x1800+0+0 (normal left inverted right x axis y axis) 294mm x 165mm
DP-1 connected 1920x1080+3200+0 (normal left inverted right x axis y axis) 598mm x 336mm panning 1920x1080+3200+0

$ xdpyinfo| grep dots
  resolution:    217x218 dots per inch

=== With clear environment: ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 217

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 217

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 


The window looks normal on the high-DPI screen, but huge on the normal monitor.

=== With QT_AUTO_SCREEN_SCALE_FACTOR=1: ===
eDP-1:
widget devicePixelRatio: 4
widget logicalDpi: 121

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 4
widget logicalDpi: 121

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

The window looks huge on the high-DPI screen and "huger" on the normal one.

=== With QT_SCREEN_SCALE_FACTORS='2;1' ===

Same as with clear environment. With current Qt 5.7, this is the only case that works properly in this environment.

=== With QT_USE_PHYSICAL_DPI=1 ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 217

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 217

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 


=== With QT_USE_PHYSICAL_DPI=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 6
widget logicalDpi: 96

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 2
widget logicalDpi: 96

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

It's big on both and the window much larger than it needs to be. Can't be resized.

=== With QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 4.52309
widget logicalDpi: 96

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 4.52309
widget logicalDpi: 96

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

Big and huge.

=== QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 5.76617
widget logicalDpi: 96

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 5.76617
widget logicalDpi: 96

platform screen logicalDpi: 217.109
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

Huge and big.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spectacle-scenario-2-drawing-errors.png
Type: image/png
Size: 56033 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160617/df36358f/attachment.png>
-------------- next part --------------
== Scenario 2 ==
* High-DPI laptop screen, regular DPI external monitor
* No X scaling
* Monitors report correct size

eDP-1 connected primary 3200x1800+0+0 (normal left inverted right x axis y axis) 294mm x 165mm
DP-1 connected 1920x1080+3200+0 (normal left inverted right x axis y axis) 598mm x 336mm panning 1920x1080+3200+0

$ xdpyinfo| grep dots
  resolution:    96x96 dots per inch

Note: Firefox and Chromium are unusable in this scenario, so it's not acceptable.

=== With clear environment: ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

The window looks tiny (unreadable) on the high-DPI screen, but normal on the normal monitor.

=== With QT_AUTO_SCREEN_SCALE_FACTOR=1: ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

The window looks tiny on the high-DPI screen and normal on the normal one.

=== With QT_SCREEN_SCALE_FACTORS='2;1' ===

Same as with clear environment. With current Qt 5.7, this is the only case that works properly in this environment.

=== With QT_USE_PHYSICAL_DPI=1 ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

Same as above (tiny; normal).

=== With QT_USE_PHYSICAL_DPI=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 3
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

It's slightly too big on the high-DPI monitor; the font size is just right on the normal monitor, but the window is too big.

=== With QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 1.00049
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1.00049
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

Tiny and normal.

=== QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 2.88309
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 0.84996
widget logicalDpi: 96

platform screen logicalDpi: 96.0473
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 81.5973

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

Slightly too big on the High DPI monitor; just right on the normal one, but with lots of drawing errors when selecting the text.
-------------- next part --------------
== Scenario 3 ==
* High-DPI laptop screen
* Regular DPI external monitor, with software scaling down
* Monitors report correct size

eDP-1 connected primary 3200x1800+0+0 (normal left inverted right x axis y axis) 294mm x 165mm
DP-1 connected 3840x2160+3200+0 (normal left inverted right x axis y axis) 598mm x 336mm panning 3840x2160+3200+0

$ xdpyinfo| grep dots
  resolution:    218x218 dots per inch

Note: this is my current, normal environment in the office. The software scaling is SLOW, but works.

=== With clear environment: ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 218

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 218

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 163.195

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

Text has the correct size on both monitors. The window is created too small.

=== With QT_AUTO_SCREEN_SCALE_FACTOR=1: ===
eDP-1:
widget devicePixelRatio: 4
widget logicalDpi: 122

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 4
widget logicalDpi: 122

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 163.195

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

Text is big on both. Window is created with the right size.

=== With QT_USE_PHYSICAL_DPI=1 ===
eDP-1:
widget devicePixelRatio: 1
widget logicalDpi: 218

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 1
widget logicalDpi: 218

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 163.195

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 0
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

Text is normal on both, window is created too small.

=== With QT_USE_PHYSICAL_DPI=1 QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 6
widget logicalDpi: 96

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 2
widget logicalDpi: 163

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 163.195

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: 
QT_DPI_ADJUSTMENT_POLICY: 

Text is huge on the High DPI monitor and just too big on the normal monitor. Window is created too large.

=== With QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 4.53755
widget logicalDpi: 96

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 4.53755
widget logicalDpi: 96

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 163.195

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

Text is a little too big on both monitors. Window is created at the right size.

=== QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR_ROUNDING_POLICY=PassThrough QT_AUTO_SCREEN_SCALE_FACTOR=1 ===
eDP-1:
widget devicePixelRatio: 5.76617
widget logicalDpi: 96

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 276.777

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

DP-1:
widget devicePixelRatio: 3.39989
widget logicalDpi: 96

platform screen logicalDpi: 217.803
platform screen logicalBaseDpi: 96
platform screen devicePixelRatio: 1
platform screen physicalDpi: 163.195

QT_FONT_DPI: 
QT_SCALE_FACTOR: 
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_USE_PHYSICAL_DPI: 1
QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough
QT_DPI_ADJUSTMENT_POLICY: 

Text is huge on the High DPI monitor and a little too big on the normal monitor. The window is created too large on the normal monitor and flashes huge text before changing to just-too-big.


More information about the Development mailing list