Maybe like this: create a QSpinBox subclass, get a hold of the QLineEdit, switch it to read only mode.

Cheers,
_