giorgik
13th June 2012, 11:57
Hello everyone, I have a question about the use of QValidator in QLineEdit:
QRegExp rx("^[1-9]{1, 3}$");
QLineEdit *lineedit = new QLineEdit(this);
lineedit->setValidator(new QRegExpValidator(rx, lineedit));
The widget will not let me enter any numbers, why?
I expected at least to enter a number between 1 and 999, but nothing.
What's missing?
QRegExp rx("^[1-9]{1, 3}$");
QLineEdit *lineedit = new QLineEdit(this);
lineedit->setValidator(new QRegExpValidator(rx, lineedit));
The widget will not let me enter any numbers, why?
I expected at least to enter a number between 1 and 999, but nothing.
What's missing?