remove Qt4 mouse wheel handling

This commit is contained in:
KIU Shueng Chuan 2021-06-29 12:30:46 +08:00
parent 1a29cf7579
commit b843214f66
2 changed files with 7 additions and 15 deletions

View File

@ -1,4 +1,4 @@
from ..Qt import QtCore, QtGui, QtWidgets, QT_LIB from ..Qt import QtCore, QtGui, QtWidgets
from OpenGL.GL import * from OpenGL.GL import *
import OpenGL.GL.framebufferobjects as glfbo import OpenGL.GL.framebufferobjects as glfbo
import numpy as np import numpy as np
@ -466,10 +466,6 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
#self.swapBuffers() #self.swapBuffers()
def wheelEvent(self, ev): def wheelEvent(self, ev):
delta = 0
if QT_LIB in ['PyQt4', 'PySide']:
delta = ev.delta()
else:
delta = ev.angleDelta().x() delta = ev.angleDelta().x()
if delta == 0: if delta == 0:
delta = ev.angleDelta().y() delta = ev.angleDelta().y()

View File

@ -317,10 +317,6 @@ class GraphicsView(QtGui.QGraphicsView):
super().wheelEvent(ev) super().wheelEvent(ev)
if not self.mouseEnabled: if not self.mouseEnabled:
return return
delta = 0
if QT_LIB in ['PyQt4', 'PySide']:
delta = ev.delta()
else:
delta = ev.angleDelta().x() delta = ev.angleDelta().x()
if delta == 0: if delta == 0:
delta = ev.angleDelta().y() delta = ev.angleDelta().y()