Snapshot/SnapshotFreehandGrabber.py

changeset 2131
e79d0610347a
parent 2106
cca04724bff8
child 2302
f29e9405c851
--- a/Snapshot/SnapshotFreehandGrabber.py	Tue Oct 09 19:31:30 2012 +0200
+++ b/Snapshot/SnapshotFreehandGrabber.py	Tue Oct 09 19:59:01 2012 +0200
@@ -10,8 +10,6 @@
 from PyQt4.QtCore import pyqtSignal, Qt, QRect, QPoint, QTimer, qVersion
 from PyQt4.QtGui import QWidget, QPixmap, QColor, QRegion, QApplication, QPainter, \
     QPalette, QToolTip, QPolygon, QPen, QBrush, QPaintEngine
-if qVersion() >= "5.0.0":
-    from PyQt4.QtGui import QScreen
 
 
 def drawPolygon(painter, polygon, outline, fill=QColor()):
@@ -83,7 +81,8 @@
         x = self.__desktop.x()
         y = self.__desktop.y()
         if qVersion() >= "5.0.0":
-            self.__pixmap = QScreen.grabWindow(self.__desktop.winId(), x, y,
+            self.__pixmap = QApplication.screens()[0].grabWindow(
+                self.__desktop.winId(), x, y,
                 self.__desktop.width(), self.__desktop.height())
         else:
             self.__pixmap = QPixmap.grabWindow(self.__desktop.winId(), x, y,

eric ide

mercurial