Thanks for you answer! this is the regular expression i was looking for. it passes my tests on the page you provided
now i'm trying to implement it
ui->setupUi(this);
QRegExp regex("^([1-9])(?!\\1)([0-9])(?!\\1|\\2)([0-9])(?!\\1|\\2|\\3)([0-9])$");
QValidator *validator = new QRegExpValidator(regex, this);
ui->lineEdit->setValidator(validator);
ui->lineEdit->setFocus();
but lineEdit only accepts first digit...do you maybe know why?
i followed the example that i've found in the documentation
// regexp: optional '-' followed by between 1 and 3 digits
QRegExp rx("-?\\d{1,3}");
QValidator *validator = new QRegExpValidator(rx, this);
QLineEdit *edit = new QLineEdit(this);
edit->setValidator(validator);
Bookmarks