Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.10, 5.15
-
None
-
Australian locale.
-
ce85cb161 (dev)
Description
In the following example, the text is displayed as "2,000" with my locale. If I remove the last '0', I get this error:
<Unknown File>:1: Error: Locale: Number.fromLocaleString(): Invalid format
import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 ApplicationWindow { visible: true width: 500 height: 120 SpinBox { id: widthSpinBox value: 2000 to: 2000 editable: true Connections { target: widthSpinBox.contentItem onTextEdited: { print("widthSpinBox.contentItem.text =", widthSpinBox.contentItem.text) var currentValue = widthSpinBox.valueFromText(widthSpinBox.contentItem.text, widthSpinBox.locale) } } } }
Attachments
Issue Links
- relates to
-
QTBUG-85739 Add textEdited signal to SpinBox
-
- Closed
-
- resulted in
-
QTBUG-114694 [Tests] tst_controls::Basic::SpinBox::test_editable_doubleSpinBox fails on macOS
-
- Closed
-
For Gerrit Dashboard: QTBUG-64151 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
308719,2 | QQuickSpinBox: fix another "function expressions as statements" warning | dev | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |
310972,2 | QQuickSpinBox: fix another "function expressions as statements" warning | 5.15 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |
469423,41 | Update displayText and value of SpinBox (live) | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
471913,13 | Sanitize Text of SpinBox before converting to value | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |