diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-01-18 11:59:56 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-19 11:11:02 +0100 |
commit | 3121a0d41006d4b5f12c6a119b99f9917ceea760 (patch) | |
tree | 27d6e14f6c85f16fb6dec9b4250381be9dca5924 | |
parent | de0a5f28bc565c971989e68a19c8621a2309ed91 (diff) |
Extend the documentation on DoubleValidator.
Elaborate on what is valid, intermediate, and invalid.
Task-number: QTBUG-22081
Change-Id: If0ef270eaee60b530fdf6275e36b2208d41c7639
Reviewed-by: Martin Jones <martin.jones@nokia.com>
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 309d039365..fb96709e8d 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -842,6 +842,23 @@ void QQuickTextInput::setAutoScroll(bool b) \ingroup qml-basic-visual-elements This element provides a validator for non-integer numbers. + + Input is accepted if it contains a double that is within the valid range + and is in the correct format. + + Input is accepected but invalid if it contains a double that is outside + the range or is in the wrong format; e.g. with too many digits after the + decimal point or is empty. + + Input is rejected if it is not a double. + + Note: If the valid range consists of just positive doubles (e.g. 0.0 to + 100.0) and input is a negative double then it is rejected. If \l notation + is set to DoubleValidator.StandardNotation, and the input contains more + digits before the decimal point than a double in the valid range may have, + it is also rejected. If \l notation is DoubleValidator.ScientificNotation, + and the input is not in the valid range, it is accecpted but invalid. The + value may yet become valid by changing the exponent. */ /*! |