Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
Description
QScreen::geometry() and QScreen::size() return a scaled screen size, as documented at https://doc.qt.io/qt-6/highdpi.html#device-independent-screen-geometry
You can get the unscaled resolution by multiplying the reported size by the device pixel ratio:
auto scr = app.primaryScreen(); qDebug() << scr->size() * scr->devicePixelRatio();
Suggestion
Provide a convenience function to return the unscaled resolution (QScreen::unscaledSize() ?)