From e3bf4f771458590dd003fc710803c1c1babea68e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 10 Oct 2015 16:07:28 +0200 Subject: Re-introduce SpinBox It came up in discussions at the QtWS that even if we have Tumbler, people still want and expect to have the good old SpinBox control. SpinBox has it pros, such as that it might work better inside a vertical Flickable, and that in multi-field forms it might visually align better with other controls like TextFields. An early mockup of SpinBox was removed in 1c0edf0. A quote from the commit message: SpinBox is a desktop centric control. It won't be provided in Qt Quick Controls 2.0, but maybe later when desktop support is re-considered. Qt Quick Controls 2.0 will focus on embedded and mobile. SpinBox is still available in 1.x. While it is true that SpinBox might not be optimal for touch or mobile, the real reason for the removal was that validating decimal number input is very complicated. Even though locales have well- defined thousand separators and decimal points, users have very different expectations on how strict or relaxed the input validation should be. This change re-introduces a touch-optimized integer-based SpinBox. What makes it more touch friendly than the earlier version is that it has now auto-repeating buttons. Limiting it to integers avoids the decimal number input validation problem. We can introduce a separate DoubleSpinBox later if necessary - just like in QtWidgets. Change-Id: I2819060eb5d1ae6a8c00b0f12be703456085079d Reviewed-by: Mitch Curtis --- src/imports/controls/controls.pri | 1 + 1 file changed, 1 insertion(+) (limited to 'src/imports/controls/controls.pri') diff --git a/src/imports/controls/controls.pri b/src/imports/controls/controls.pri index 41651a24..53615c08 100644 --- a/src/imports/controls/controls.pri +++ b/src/imports/controls/controls.pri @@ -15,6 +15,7 @@ QML_FILES = \ ScrollBar.qml \ ScrollIndicator.qml \ Slider.qml \ + SpinBox.qml \ StackView.qml \ Switch.qml \ SwipeView.qml \ -- cgit v1.2.3