diff --git a/pyqtgraph/widgets/SpinBox.py b/pyqtgraph/widgets/SpinBox.py index 50429dee..86cbba93 100644 --- a/pyqtgraph/widgets/SpinBox.py +++ b/pyqtgraph/widgets/SpinBox.py @@ -264,6 +264,10 @@ class SpinBox(QtGui.QAbstractSpinBox): return le.setSelection(0, index) + def focusInEvent(self, ev): + super(SpinBox, self).focusInEvent(ev) + self.selectNumber() + def value(self): """ Return the value of this SpinBox.