From 665988dc4f7a6b6d57336719801b47c3662c47d0 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Tue, 26 Jan 2021 10:16:56 +0800 Subject: [PATCH] remove spinbox return key workaround the code being removed was committed in 2012. the reason for the workaround no longer exists. the reason this code is under scrutiny is because while porting to PyQt6, calling ev.type() triggered a bug in PyQt6 6.0 --- pyqtgraph/widgets/SpinBox.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pyqtgraph/widgets/SpinBox.py b/pyqtgraph/widgets/SpinBox.py index 55e112da..d9156777 100644 --- a/pyqtgraph/widgets/SpinBox.py +++ b/pyqtgraph/widgets/SpinBox.py @@ -113,12 +113,6 @@ class SpinBox(QtGui.QAbstractSpinBox): self.editingFinished.connect(self.editingFinishedEvent) - def event(self, ev): - ret = super().event(ev) - if ev.type() == QtCore.QEvent.KeyPress and ev.key() == QtCore.Qt.Key_Return: - ret = True ## For some reason, spinbox pretends to ignore return key press - return ret - def setOpts(self, **opts): """Set options affecting the behavior of the SpinBox.