# [solved] QLineEdit, double VS maskedit!

• Hi all!
I try to find something on google, but I really not find something cool to use on my app!
My problem is that I have a QLineEdit with this mask: "R\$ 009,99", put when I set on double value, for example 12,34 , to the QLineEdit I got this: "R\$ 12 ,34" and not "R\$ 012,34" or "R\$ 12,34".

What can I do to solve this problem in easy way?

Thanks!

• I'm setting the text with this code:
@
ui->leTotal->setText(QString::number(value));
@

• And I'm habing another problem now...

@
R\$ 0000,00;0
@

When I type the value "R\$ 0050,00" the field shows as needed, but when I do "ui->leTotal->text()" the return value is: R\$ 5,00".
When I type the value "R\$ 0051,00" the field shows as needed, but when I do "ui->leTotal->text()" the return value is: R\$ 51,00".
I'm doing something wrong?
I'm doing something wrong?

Thanks all!

• this masks really makes me crazy!

• Hi,

Try using 9 instead of 0.
@
9 ASCII digit required. 0-9.
0 ASCII digit permitted but not required.
@

Hope it helps

• I solve my second problem, solution THE MASK:

@
R\$ 0000,00;9
@

But the first one I need some help...
Thanks!

As I show here the change the 0 to 9 works fine!

Thank you very much!

• You're welcome.