In a Qt designer Form Class e have this lines in the constructor:
rx = new QRegExp("[0-9]{1,3}");
ui->lineEdit->setValidator(new QRegExpValidator (*rx, this));
To copy to clipboard, switch view to plain text mode
Can i manage this same effect in a single line?
In a Qt designer Form Class e have this lines in the constructor:
rx = new QRegExp("[0-9]{1,3}");
ui->lineEdit->setValidator(new QRegExpValidator (*rx, this));
To copy to clipboard, switch view to plain text mode
Can i manage this same effect in a single line?
Added after 4 minutes:
ops...
ui->lineEdit->setValidator(new QRegExpValidator (QRegExp("[0-9]{1,3}"), this));
To copy to clipboard, switch view to plain text mode
Bookmarks