Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Using decimal point separator on french OS
Bert59 last edited by
I have a TextInput component with the validator set to DoubleValidator.
On my PC the decimal separator is the coma (,) but I need the point (.) as decimal separator independly in which country the application is running.
How can I do that?
SimonSchroeder last edited by
I have never tried it myself. However,
QValidatorhas a method
setLocale(). This sets how the input should be interpreted. Most likely you are looking for
QLocale::Cwhich only support the point and not the comma (at least as decimal separator). Though by default locales allow for group separators. So, you might want to get a copy of the C locale object and adjust the
Let me know if this approach works.