#ifndef FORMATTERSPINBOX_H #define FORMATTERSPINBOX_H #include #include class FormatterSpinBox : public QSpinBox { Q_OBJECT private: int m_nwidth; public: explicit FormatterSpinBox(QWidget *parent = Q_NULLPTR); int valueFromText(const QString &text) const Q_DECL_OVERRIDE; QString textFromValue(int value) const Q_DECL_OVERRIDE; void setFormatterWidth(int wid); }; #endif // SPINBOX_H