| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until we get a dedicated DoubleSpinBox control, we should make it
easier for users to roll their own. We have a snippet for this in
the docs already, but we can make it better:
- Make the SpinBox editable. It's not very useful as an example if it's
not, since the stepSize is an integer, so there's no way to modify
the decimal component otherwise (without modifying the source, which
users shouldn't have to do).
- Set decimals in the validator so that it prevents entering more than
2.
- Add a convenience function to convert decimals to integers.
- Store the magic number 100 in a read-only property.
- Use StandardNotation rather than ScientificNotation. This allows
our internal fixup logic to work with the entered text.
- Rename spinbox to spinBox.
Task-number: QTBUG-67349
Change-Id: I2b0cab086b87d668408df194440ebaf64f598241
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit e0c13e1138a1730047e627f4cb2087f6217b8d42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|