LineEdit should not accept only zero's
Hi,
I have lineEdit which should accepts only integers and float values,so using QRegExp rxacres( "^[0-9.]*$" ) i controlled it.
Now this lineEdit should not accept only zero's,i mean like this 0 , 000, 00.000 , 0.000
For not accepting 0 or 0000 or 00 i have written some logic and its working fine ,i can write for 0.00 or 00.00.......... But i just want to know by using inbulit methods or through QRegExp can we control this Behaviour or not ...?
Regards
Beginner
Re: LineEdit should not accept only zero's
Hi,
musn't the "." be escapled? and then simple do
Code:
^([0-9]*[1-9]+[0-9\\.]*|[0-9\\.]*[0-9]*[1-9]+[0-9]*)$