Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.1
Description
Currently, User can specify the locale to DoubleValidator but the numberOptions set for that locale does not make any difference to the validator.
E.g, If user wants to restrict comma(,) in DoubleValidator and has set NumberOption to Locale.RejectGroupSeparator, it does not work. Please refer to the attached sample.
TextField { id: myspin inputMethodHints: Qt.ImhFormattedNumbersOnly property var spinLocale: Qt.locale("C") validator: DoubleValidator { bottom: 0.0 top: 100.1 notation: DoubleValidator.StandardNotation } Component.onCompleted: { spinLocale.NumberOption = Locale.RejectGroupSeparator myspin.validator.locale = myspin.spinLocale.name } }
Attachments
Issue Links
- relates to
-
QTBUG-75110 Number.fromLocaleString is stricter than DoubleValidator
- Closed