Graphics/SvgDiagram.py

changeset 3656
441956d8fce5
parent 3591
2f2a4a76dd22
child 3778
0c5bc18da740
--- a/Graphics/SvgDiagram.py	Sun Jun 29 14:00:30 2014 +0200
+++ b/Graphics/SvgDiagram.py	Sun Jun 29 20:13:56 2014 +0200
@@ -9,10 +9,11 @@
 
 from __future__ import unicode_literals
 
-from PyQt4.QtCore import Qt, QSize, QEvent
-from PyQt4.QtGui import QPalette, QSizePolicy, QScrollArea, QAction, QMenu, \
-    QToolBar, QPrinter, QPrintDialog, QPainter, QFont, QColor
-from PyQt4.QtSvg import QSvgWidget
+from PyQt5.QtCore import Qt, QSize, QEvent
+from PyQt5.QtGui import QPalette, QPainter, QFont, QColor
+from PyQt5.QtWidgets import QSizePolicy, QScrollArea, QAction, QMenu, QToolBar
+from PyQt5.QtPrintSupport import QPrinter, QPrintDialog
+from PyQt5.QtSvg import QSvgWidget
 
 from E5Gui.E5MainWindow import E5MainWindow
 from E5Gui.E5ZoomWidget import E5ZoomWidget
@@ -156,7 +157,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.delta() < 0:
+            if evt.angleDelta().y() < 0:
                 self.__zoomOut()
             else:
                 self.__zoomIn()
@@ -295,7 +296,7 @@
         """
         Private slot called to show a print preview of the diagram.
         """
-        from PyQt4.QtGui import QPrintPreviewDialog
+        from PyQt5.QtPrintSupport import QPrintPreviewDialog
         
         printer = QPrinter(mode=QPrinter.ScreenResolution)
         printer.setFullPage(True)

eric ide

mercurial