Error when using Qlineedit setInputMask
Unsolved
General and Desktop
-
In my software, I set an input mask to a QlineEdit and it works fine unless I set the value using setText with a value that does not attend to the input mask restrictions. From that point on visually, the input mask does not work anymore.
the input mask is: "^-?[0-9]+[.]{0,1}[0-9]{"x"}$
x is the number of decimal digits allowedIt is set a value like -0.XX. And the error occurs.
Does anyone have any idea why that happens?
-
Hi and welcome to devnet,
Your input mask looks a bit fishy. It seems to be a regexp rather than an input mask. Is it the case ?
-
These are two different concepts which usually do not contain the same expressions because they are doing two different things.