class SpinBox : public QSpinBox
{
public:
SpinBox(QWidget *parent = 0) : QSpinBox(parent) {}
QValidator::State validate(QString &input, int &pos) const
{
if (input != "0") {
return QValidator::Acceptable;
} else {
return QValidator::Invalid;
}
}
};