Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
None
-
4.8.0
-
None
-
Mac OS X 10.7.2
Qt 4.8.0
Description
Since OS X 10.7 previously working screenshot code is not working anymore.
Qt 4.8 fixed that only a black image was returned.
Still with multiple screens somehow content from secondary displays gets copied onto the primary display.
Example Screenshots:
http://sau.frubar.net/p/shots/011m2hOskvSiQk2la2sAAQ.jpg (big left screen is primary)
http://sau.frubar.net/p/shots/MSmgT73Hpc8KvfVu3Kv2dQ.jpg (small right screen is primary)
Code that previously worked:
QPixmap shot; QRect allScreens; for(int i = 0; i < QApplication::desktop()->numScreens(); ++i) { allScreens = allScreens.united(QApplication::desktop()->screenGeometry(i)); } shot = QPixmap::grabWindow(QApplication::desktop()->screen(-1)->winId(), allScreens.x(), allScreens.y(), allScreens.width(), allScreens.height());