Snapshot/SnapshotFreehandGrabber.py

changeset 5736
000ea446ff4b
parent 5653
c023821bb25f
child 6048
82ad8ec9548c
--- a/Snapshot/SnapshotFreehandGrabber.py	Sat May 13 13:46:05 2017 +0200
+++ b/Snapshot/SnapshotFreehandGrabber.py	Sat May 13 16:32:54 2017 +0200
@@ -9,12 +9,13 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import pyqtSignal, Qt, QRect, QPoint, QTimer, QLocale, \
-    qVersion
+from PyQt5.QtCore import pyqtSignal, Qt, QRect, QPoint, QTimer, QLocale
 from PyQt5.QtGui import QPixmap, QColor, QRegion, QPainter, QPalette, \
     QPolygon, QPen, QBrush, QPaintEngine
 from PyQt5.QtWidgets import QWidget, QApplication, QToolTip
 
+from Globals import qVersionTuple
+
 
 def drawPolygon(painter, polygon, outline, fill=None):
     """
@@ -86,7 +87,7 @@
         self.__desktop = QApplication.desktop()
         x = self.__desktop.x()
         y = self.__desktop.y()
-        if qVersion() >= "5.0.0":
+        if qVersionTuple() >= (5, 0, 0):
             self.__pixmap = QApplication.screens()[0].grabWindow(
                 self.__desktop.winId(), x, y,
                 self.__desktop.width(), self.__desktop.height())

eric ide

mercurial