QLineedit inputmask and settext
-
Hi!
I have a form for editing the exact number floating with the qlinedit field. The input mask value is "0009.00; _".
When I enter 3.10, the contents of the editor box will be 3 ___.10, but it should be ___ 3.10.
What could be the problem?Thanks in advance
-
Hi!
I have a form for editing the exact number floating with the qlinedit field. The input mask value is "0009.00; _".
When I enter 3.10, the contents of the editor box will be 3 ___.10, but it should be ___ 3.10.
What could be the problem?Thanks in advance
@Kutyus said in QLineedit inputmask and settext:
What could be the problem?
I think it has to do with the dot.
You type3(first 0 set to 3), when you insert the dot, the cursor jumps to____.0(mask condition is fulfilled, as there is one required digit).
So I think the dot messes this up.If you start with a dot, without typing any leading number, this
___.00is possible too, even if there is a required digit on the left of the dot.IDK if this is intended but it seems, that the order of the mask characters gets ignored, when you type a given char and the cursor jumps to its position
-
Sorry, I typed badly, I wanted to enter the value with the setText () method, then this will be the result.
-
@jsulm
It works, it's just complicated to produce a string, and I have several different ones.