Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.2, 5.12.2
-
None
Description
Formerly we enabled Qt::AA_EnableHighDpiScaling in our software and started to observe some issues with texts that are shrinked unexpectedly under some primary/secondary scaling settings. Widgets displayed on a non-primary monitor are affected by changing scaling on the primary one. Here are tested use cases (individual screenshots are attached) with some observations:
Use case | Primary monitor scaling | Secondary monitor scaling | Notes |
---|---|---|---|
1 | 125% (recommended) | 100% (recommended) | Dialog on the secondary monitor. |
2 | 150% | 100% (recommended) | Dialog on the secondary monitor. Expected same font size as in use case 1, but the texts shrank. |
3 | 175% | 100% (recommended) | Dialog on the secondary monitor. Texts still shrinked, but less than in use case 2. |
4 | 125% (recommended) | 100% (recommended) | Dialog on the primary monitor. Looks as expected. |
5 | 150% | 100% (recommended) | Dialog on the primary monitor. Looks as expected. |
6 | 175% | 100% (recommended) | Dialog on the primary monitor. Looks as expected. |
7 | 150% | 125% | Dialog on the secondary monitor. Texts shrank pretty much in the same way as in use case 2. |
8 | 150% | 150% | Dialog on the secondary monitor. The texts get quite big. |
The primary screen is a laptop screen (1920x1080 15.6") and the secondary one is an external monitor (1920x1200 24").
I've looked at sources briefly and found for example hardcored screen 0 on multiple places in QFontMetrics (for example here in the current sources) constructor, which could be one source of such problems. This was on Windows but I expect some issues also on Linux due to the hardcoded primary screen.
The screenshots were obtained with Qt 5.11.2, it was also observed with Qt 5.12.2. Also worth noting is that I can observe this problem with Qt Creator (using version 4.7.2).