Snapshot/SnapWidget.py

changeset 2131
e79d0610347a
parent 2106
cca04724bff8
child 2302
f29e9405c851
--- a/Snapshot/SnapWidget.py	Tue Oct 09 19:31:30 2012 +0200
+++ b/Snapshot/SnapWidget.py	Tue Oct 09 19:59:01 2012 +0200
@@ -17,8 +17,6 @@
     QEvent, QRegExp, qVersion
 from PyQt4.QtGui import QWidget, QImageWriter, QApplication, QPixmap, QCursor, QDrag, \
     QShortcut, QKeySequence, QDesktopServices
-if qVersion() >= "5.0.0":
-    from PyQt4.QtGui import QScreen
 
 from E5Gui import E5FileDialog, E5MessageBox
 
@@ -353,7 +351,7 @@
         if self.__mode == SnapWidget.ModeFullscreen:
             desktop = QApplication.desktop()
             if qVersion() >= "5.0.0":
-                self.__snapshot = QScreen.grabWindow(desktop.winId(),
+                self.__snapshot = QApplication.screens()[0].grabWindow(desktop.winId(),
                     desktop.x(), desktop.y(), desktop.width(), desktop.height())
             else:
                 self.__snapshot = QPixmap.grabWindow(desktop.winId(),
@@ -365,7 +363,7 @@
             x = geom.x()
             y = geom.y()
             if qVersion() >= "5.0.0":
-                self.__snapshot = QScreen.grabWindow(
+                self.__snapshot = QApplication.screens()[0].grabWindow(
                     desktop.winId(), x, y, geom.width(), geom.height())
             else:
                 self.__snapshot = QPixmap.grabWindow(

eric ide

mercurial