From 030c49e659f52e34c660d2fc41dec8448b53697a Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sun, 7 Feb 2021 07:47:50 +0800 Subject: [PATCH] PyQt6 6.0.1 QEvent.Type needs to be explicitly deserialized in PyQt6 6.0.0, QEvent.Type was automatically pickled / unpickled. in PyQt6 6.0.1, QEvent.Type is now pickled to be an int, so needs to be recreated back explicitly (like the other bindings) this change is backwards compatible with PyQt6 6.0.0 --- pyqtgraph/widgets/RemoteGraphicsView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/widgets/RemoteGraphicsView.py b/pyqtgraph/widgets/RemoteGraphicsView.py index 119604c4..c9549c8a 100644 --- a/pyqtgraph/widgets/RemoteGraphicsView.py +++ b/pyqtgraph/widgets/RemoteGraphicsView.py @@ -250,8 +250,8 @@ class Renderer(GraphicsView): def deserialize_mouse_event(self, mouse_event): typ, pos, gpos, btn, btns, mods = mouse_event + typ = QtCore.QEvent.Type(typ) if QT_LIB != 'PyQt6': - typ = QtCore.QEvent.Type(typ) btn = QtCore.Qt.MouseButton(btn) btns = QtCore.Qt.MouseButtons(btns) mods = QtCore.Qt.KeyboardModifiers(mods)