Details
Description
Using the screenshot example,
http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html,
I did a screen capture on my two monitor system and saved the screen shot and noticed that the captured QPixmap is stretched horizontally.
It seems that even though the Qt example uses
screen->grabWindow(0);
the returned QPixmap to grab then given screen has the width of the entire two monitor desktop.
If I unplug my second monitor the screen is captured with the correct aspect ratio.
The same code works fine on my Windows 10 system.
To get the correct screenshot on Mac I needed to modify the example to explicitly use the screen area
QRect r = screen->geometry(); originalPixmap = screen->grabWindow(0, r.x(), r.y(), r.width(), r.height());
This works correctly on my system where both screens have the same DevicePixelRatio.
May be related to another grabWindow issue, QTBUG-71802.