Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
6.2.3, 6.3.0 Beta2
-
None
-
Dell XPS 15 9560, Windows 10 Pro Version 10.0.19044 Build 19044, MSVC 2019
Description
I have two screens with resolution 1920x1080.
DISPLAY2 is the main screen, connected via HDMI directly to the laptop. DISPLAY1 is the laptop screen and it's on the right.
When running this simple code
#include <QGuiApplication> #include <QScreen> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QList<QScreen *> screens = app.screens(); for (QScreen *screen : screens) qDebug() << screen->name() << screen->geometry() << screen->devicePixelRatio(); return 0; }
I get wrong size for the screen geometry for the screen DISPLAY1 when the primary screen has scale 100%. Here are the tests I have done
- DISPLAY2 is scaled at 100%, DISPLAY1 is scaled at 125%
- DISPLAY2" QRect(0,0 1920x1080) 1 -> Correct
- DISPLAY1" QRect(1920,0 1920x1080) 1.25 -> expected result: QRect(1920,0 1536x864) 1.25
- DISPLAY2 is scaled at 150%, DISPLAY1 is scaled at 125%
- DISPLAY2" QRect(0,0 1280x720) 1.5 -> Correct
- DISPLAY1" QRect(1920,0 1536x864) 1.25 -> Correct
- DISPLAY2 is scaled at 100%, DISPLAY1 is scaled at 175%
- DISPLAY2" QRect(0,0 1920x1080) 1 -> Correct
- DISPLAY1" QRect(1920,0 1920x1080) 1.75 -> expected result: QRect(1920,0 1097x617) 1.75
- DISPLAY2 is scaled at 150%, DISPLAY1 is scaled at 175%
- DISPLAY2" QRect(0,0 1280x720) 1.5 -> correct
- DISPLAY1" QRect(1920,0 1097x617) 1.75 -> correct
- DISPLAY2 is scaled at 125%, DISPLAY1 is scaled at 100%
- DISPLAY2" QRect(0,0 1536x864) 1.25 -> correct
- DISPLAY1" QRect(1920,0 1920x1080) 1 -> correct
Everything works fine with Qt 6.1.3
Attachments
Issue Links
- relates to
-
QTBUG-101296 Inconsistent QScreen geometry in multiple screens using different scaling factors
- Closed
For Gerrit Dashboard: QTBUG-101601 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
403115,3 | Fix high-dpi and QScreen state initialization | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |