Difficulty to enter negative numbers in TextEdit, TextInput etc... boxes.
-
Hello,
I have some small difficulties when entering negative numbers into TextInput boxes in QML.
If I press the "-", "1", "2", "3" keys successively, I get 123 instead of -123.
The only way to enter "-123" is to type 123 and then click on the beginning of the number and type -.The value -123 is then obtained.Is there something I didn't understand?
Thank you!
-
Yes, that's right, but that doesn't change anything... I can enter a negative value but in a rather convoluted way.
-
Yes! You're right !
In fact, I manage the TextEdit anchor using C++.
I was using the "int" type but it was a mistake!I had to use QString and then convert to integer only if the QString is different from "-" in the loop I use.Thanks Markkyboy for your help !