Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
6.4.2, 6.5.0
Description
grabWindow() is unable to capture entire screen in dual screen setup and if second screen happen to be 4k when capturing as follows:
QRect desktopGeo = QApplication::primaryScreen()->virtualGeometry(); QPixmap screenshotFullscreen = QApplication::primaryScreen()->grabWindow(0, desktopGeo.x(), desktopGeo.y(), desktopGeo.width(), desktopGeo.height());
The resulting image from grabWindow lacks the 25% on the second screen. As it seems that the devicePixelRatio is ignored by grabWindow function.
Setup:
First screen QRect(0,0 1920x1080) / devicePixelRatio: 1
Second screen QRect(1920,-764 3072x1728) / devicePixelRatio: 1.25
Attached small code reproduces this.
This works good with Qt5.15.11 and Qt6.2.4.