E5Gui/E5ModelToolBar.py

changeset 5736
000ea446ff4b
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
--- a/E5Gui/E5ModelToolBar.py	Sat May 13 13:46:05 2017 +0200
+++ b/E5Gui/E5ModelToolBar.py	Sat May 13 16:32:54 2017 +0200
@@ -9,10 +9,12 @@
 
 from __future__ import unicode_literals
 
-from PyQt5.QtCore import pyqtSignal, qVersion, Qt, QModelIndex, QPoint, QEvent
+from PyQt5.QtCore import pyqtSignal, Qt, QModelIndex, QPoint, QEvent
 from PyQt5.QtGui import QDrag, QPixmap, QIcon
 from PyQt5.QtWidgets import QApplication, QToolBar, QToolButton
 
+from Globals import qVersionTuple
+
 
 class E5ModelToolBar(QToolBar):
     """
@@ -251,7 +253,7 @@
         drag = QDrag(self)
         drag.setMimeData(self.__model.mimeData([idx]))
         actionRect = self.actionGeometry(act)
-        if qVersion() >= "5.0.0":
+        if qVersionTuple() >= (5, 0, 0):
             drag.setPixmap(self.grab(actionRect))
         else:
             drag.setPixmap(QPixmap.grabWidget(self, actionRect))

eric ide

mercurial