Closed apage43 closed 1 year ago
it seems on a Windows system with German locale the only way to set float values is entering them like 2E-01, both 0.2 and 0,2 incorrectly become 2
2E-01
0.2
0,2
I believe the QML DoubleValidator etc are locale aware by default but parseFloat is not
We either need to change the validators on the text field to behave in a way that matches JS parseFloat
or use locale-aware parsing/displaying https://doc.qt.io/qt-6/qml-qtqml-number.html#fromLocaleString-method
it seems on a Windows system with German locale the only way to set float values is entering them like
2E-01
, both0.2
and0,2
incorrectly become 2I believe the QML DoubleValidator etc are locale aware by default but parseFloat is not
We either need to change the validators on the text field to behave in a way that matches JS parseFloat
or use locale-aware parsing/displaying https://doc.qt.io/qt-6/qml-qtqml-number.html#fromLocaleString-method