path: root/tests/benchmarks
diff options
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-10 16:07:28 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-22 14:42:16 +0000
commite3bf4f771458590dd003fc710803c1c1babea68e (patch)
tree853c9805e2c21b79d5df479914da921db5725852 /tests/benchmarks
parent51458ba5400c1dcaef1bd2101cbf60a8ddc2a0fa (diff)
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 <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/benchmarks')
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/benchmarks/objectcount/tst_objectcount.cpp b/tests/benchmarks/objectcount/tst_objectcount.cpp
index 3b5db87d..b2170cd5 100644
--- a/tests/benchmarks/objectcount/tst_objectcount.cpp
+++ b/tests/benchmarks/objectcount/tst_objectcount.cpp
@@ -209,6 +209,10 @@ void tst_ObjectCount::testCount_data()
<< QByteArray("import QtQuick.Controls 1.3; Slider { }")
<< QByteArray("import Qt.labs.controls 1.0; Slider { }");
+ QTest::newRow("SpinBox")
+ << QByteArray("import QtQuick.Controls 1.3; SpinBox { }")
+ << QByteArray("import Qt.labs.controls 1.0; SpinBox { }");
<< QByteArray("import QtQuick.Controls 1.3; StackView { }")
<< QByteArray("import Qt.labs.controls 1.0; StackView { }");