spinbox selects only numerical portion of text on focus-in

This commit is contained in:
Luke Campagnola 2016-11-30 09:18:09 -08:00
parent c97c5f51e2
commit 5ddbb611d1

View File

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