From edea696bc3a43a02f15a2e8af7d98690bc198411 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 16 Jan 2021 17:36:27 +0800 Subject: [PATCH] ROI.py : pyqt6 has no KeyboardModifier class the correct type to use is actually KeyboardModifiers --- pyqtgraph/graphicsItems/ROI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/graphicsItems/ROI.py b/pyqtgraph/graphicsItems/ROI.py index 52a61ff5..b775a4ad 100644 --- a/pyqtgraph/graphicsItems/ROI.py +++ b/pyqtgraph/graphicsItems/ROI.py @@ -820,7 +820,7 @@ class ROI(GraphicsObject): """ return True - def movePoint(self, handle, pos, modifiers=QtCore.Qt.KeyboardModifier(), finish=True, coords='parent'): + def movePoint(self, handle, pos, modifiers=QtCore.Qt.KeyboardModifiers(0), finish=True, coords='parent'): ## called by Handles when they are moved. ## pos is the new position of the handle in scene coords, as requested by the handle. @@ -1415,7 +1415,7 @@ class Handle(UIGraphicsItem): self.currentPen = self.hoverPen self.movePoint(pos, ev.modifiers(), finish=False) - def movePoint(self, pos, modifiers=QtCore.Qt.KeyboardModifier(), finish=True): + def movePoint(self, pos, modifiers=QtCore.Qt.KeyboardModifiers(0), finish=True): for r in self.rois: if not r.checkPointMove(self, pos, modifiers): return