QScintilla/Shell.py

changeset 3778
0c5bc18da740
parent 3693
983904b9568f
child 3974
01991e605ba0
--- a/QScintilla/Shell.py	Mon Sep 08 20:13:54 2014 +0200
+++ b/QScintilla/Shell.py	Sat Sep 13 16:13:52 2014 +0200
@@ -12,7 +12,7 @@
 import sys
 import re
 
-from PyQt5.QtCore import pyqtSignal, QFileInfo, Qt, QEvent
+from PyQt5.QtCore import pyqtSignal, QFileInfo, Qt, QEvent,  qVersion
 from PyQt5.QtGui import QClipboard, QPalette, QFont
 from PyQt5.QtWidgets import QDialog, QInputDialog, QApplication, QMenu, \
     QWidget, QHBoxLayout, QVBoxLayout, QShortcut
@@ -857,7 +857,11 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if evt.angleDelta().y() < 0:
+            if qVersion() >= "5.0.0":
+                delta = evt.angleDelta().y()
+            else:
+                delta = evt.delta()
+            if delta < 0:
                 self.zoomOut()
             else:
                 self.zoomIn()

eric ide

mercurial