Eneboo - Documentación para desarrolladores
|
Métodos públicos | |
QSpinBoxValidator (QSpinBox *sb, const char *name) | |
virtual State | validate (QString &str, int &pos) const |
QSpinBoxValidator::QSpinBoxValidator | ( | QSpinBox * | sb, |
const char * | name | ||
) | [inline] |
QValidator::State QSpinBoxValidator::validate | ( | QString & | input, |
int & | |||
) | const [virtual] |
Returns Acceptable
if the input is an integer within the valid range, Intermediate
if the input is an integer outside the valid range and Invalid
if the input is not an integer.
Note: If the valid range consists of just positive integers (e.g. 32 - 100) and input is a negative integer then Invalid is returned.
int pos = 0; s = "abc"; v.validate( s, pos ); // returns Invalid s = "5"; v.validate( s, pos ); // returns Intermediate s = "50"; v.validate( s, pos ); // returns Valid
Reimplementado de QIntValidator.