Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.14.2
-
None
Description
QScreen::geometry() should return the geometry (i. e. the position and size) of the corresponding screen as QRect. However, this QRect contains the position of the screen in physical pixels and the size in device independent pixels, which causes an annoying offset if the screen is not the screen at (0, 0).
Specifically, I have a 1920x1080 screen at (0, 0) and a 1280x1024 screen at (1920x1080). This gives me an arrangement of two screens which are diagonally connected at the corner. The screen scale is globally 131.25%.
When I choose a QScreen* from QGuiApplications::screens(), I get these geometries:
QRect(0,0 1463x823)
QRect(1920,1080 975x780)
The first is correct, the second should be QRect(1463,823 975x780).
One could argue that screens can have different device pixel ratio, so their absolute position can not be calculated using the own device pixel ratio. But I expect QScreen::geometry() to match the geometry of QWidget(), no matter which device pixel ratios are used.
Attachments
Issue Links
- relates to
-
QTBUG-56555 Need clarification of QScreen::geometry() for High DPI screens
- Reported