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
This commit is contained in:
KIU Shueng Chuan 2021-01-26 10:16:56 +08:00
parent d5e516ad52
commit 665988dc4f

View File

@ -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.