aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/snippets/qtquickcontrols-spinbox-double.qml
Commit message (Collapse)AuthorAgeFilesLines
* Doc: improve the SpinBox floating point exampleMitch Curtis2023-05-121-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Doc: remove "2" from Qt Quick Controls filesMitch Curtis2022-12-011-0/+32
Work on this was already started for the documentation in 1abdfe5d5a052f2298b7bf657513dfa7e0c66a56. The CMake target (docs_QuickControls2) probably can't be renamed until we rename the library, which won't happen until Qt 7. Task-number: QTBUG-95413 Change-Id: Ied20805a91286436606577c3de39671a447f27dd Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>