Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.3.5, 4.5.3
-
None
-
Windows XP
Description
The obvious reason to use QDoubleValidator as a Validator for a QLineEdit is to prevent a later QLineEdit.text().toDouble() to fail.
However .toDouble() seems to accept white space in front and back of a double value in the QString().
The restriction of no spaces in front or back of a double value in the QDoubleValidator limits the usage of a QLineEdit during Copy/Paste procedures.
Sometime you might copy a double value from a source text, but not clicking exactly with the mouse or usage a software that extracts a space around a double-clicked double value you have ' 123.12345 ' in your clipboard.
It is not possible to paste this into the QLineEdit with a QDoubleValidator attached.
Maybe a fixup() that reduces the spaces and reduces the number of digits would be nice.
Attachments
Issue Links
- relates to
-
QTBUG-66187 Whitespace handling in number conversion differently for QByteArray and QString
- Closed