LineEdit write only number
-
Help please
I few months ago this code worked (I could only enter the numbers) but now it does not work
@
QRegExp exp ("[1-9.1]{100}");
ui->lineEdit->setValidator(new QRegExpValidator(exp,this));
@Help me please
[edit: added missing coding tags @ SGaist]
-
Hi and welcome to devnet,
That's not really a Qt question but anyway: your regexp looks wrong. You are asking for your user to enter exactly 100 time something containing [1-9.1]
-
How about [0-9]+