Merge pull request #1555 from pijyoi/pyqt6_remote_mouse

PyQt6 6.0.1 QEvent.Type needs to be explicitly deserialized
This commit is contained in:
Ogi Moore 2021-02-06 21:43:06 -08:00 committed by GitHub
commit 6d3de52773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,8 +250,8 @@ class Renderer(GraphicsView):
def deserialize_mouse_event(self, mouse_event): def deserialize_mouse_event(self, mouse_event):
typ, pos, gpos, btn, btns, mods = mouse_event typ, pos, gpos, btn, btns, mods = mouse_event
typ = QtCore.QEvent.Type(typ)
if QT_LIB != 'PyQt6': if QT_LIB != 'PyQt6':
typ = QtCore.QEvent.Type(typ)
btn = QtCore.Qt.MouseButton(btn) btn = QtCore.Qt.MouseButton(btn)
btns = QtCore.Qt.MouseButtons(btns) btns = QtCore.Qt.MouseButtons(btns)
mods = QtCore.Qt.KeyboardModifiers(mods) mods = QtCore.Qt.KeyboardModifiers(mods)