Fixed mouse wheel in RemoteGraphicsView + PySide
This commit is contained in:
parent
b8840e2224
commit
5cea58545f
@ -108,7 +108,7 @@ class RemoteGraphicsView(QtGui.QWidget):
|
|||||||
return QtGui.QWidget.mouseMoveEvent(self, ev)
|
return QtGui.QWidget.mouseMoveEvent(self, ev)
|
||||||
|
|
||||||
def wheelEvent(self, ev):
|
def wheelEvent(self, ev):
|
||||||
self._view.wheelEvent(ev.pos(), ev.globalPos(), ev.delta(), int(ev.buttons()), int(ev.modifiers()), ev.orientation(), _callSync='off')
|
self._view.wheelEvent(ev.pos(), ev.globalPos(), ev.delta(), int(ev.buttons()), int(ev.modifiers()), int(ev.orientation()), _callSync='off')
|
||||||
ev.accept()
|
ev.accept()
|
||||||
return QtGui.QWidget.wheelEvent(self, ev)
|
return QtGui.QWidget.wheelEvent(self, ev)
|
||||||
|
|
||||||
@ -243,6 +243,7 @@ class Renderer(GraphicsView):
|
|||||||
def wheelEvent(self, pos, gpos, d, btns, mods, ori):
|
def wheelEvent(self, pos, gpos, d, btns, mods, ori):
|
||||||
btns = QtCore.Qt.MouseButtons(btns)
|
btns = QtCore.Qt.MouseButtons(btns)
|
||||||
mods = QtCore.Qt.KeyboardModifiers(mods)
|
mods = QtCore.Qt.KeyboardModifiers(mods)
|
||||||
|
ori = (None, QtCore.Qt.Horizontal, QtCore.Qt.Vertical)[ori]
|
||||||
return GraphicsView.wheelEvent(self, QtGui.QWheelEvent(pos, gpos, d, btns, mods, ori))
|
return GraphicsView.wheelEvent(self, QtGui.QWheelEvent(pos, gpos, d, btns, mods, ori))
|
||||||
|
|
||||||
def keyEvent(self, typ, mods, text, autorep, count):
|
def keyEvent(self, typ, mods, text, autorep, count):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user