Perhaps you could construct your own QDoubleValidator and set it via QAbstractSpinBox::lineEdit() [protected].