qt6-bb10/tests/auto/widgets/widgets
Harald Nordgren 97e40a5409 Allow adaptive decimal stepping for QSpinBox and QDoubleSpinBox
Adds the feature of adaptive decimal step sizes for the QSpinBox and
QDoubleSpinBox. By performing a calculation in
QAbstractSpinBox::stepBy() we continuously set the step size one power
of ten below the current value.

So when the value is 1100, the step is set to 100, so stepping up once
increases it to 1200. For 1200 stepping up takes it to 1300. For
negative values stepping down from -1100 goes to -1200.

It also works for all decimal values. 0.041 is increased to 0.042 by
stepping once, and so on.

The step direction is taken into account to handle edges cases, so that
stepping down from 100 takes the value to 99 instead of 90. Thus, a
step up followed by a step down -- or vice versa -- lands on the
starting value; 99 -> 100 -> 99.

Setting this property effectively disregards singleStep, but preserves
its value so that it takes effect again when adaptive decimal step is
disabled.

Adaptive decimal step allows values to be easily set to reasonable
levels. If the spin box value is 12000, changing to 13000 often makes
more sense than to 12001. The feature is turned off be default, when
single stepping is desired.

The accelerated property allows values to be changed quickly, as well,
but it is imprecise. Holding down the button makes it hard to land on
an even thousand, like 12000 or 13000. Often you end up somewhere
nearby and would need a second adjustment to get to an even hundred or
thousand.

[ChangeLog][QtWidgets] Add option of adaptive decimal step size for
QSpinBox and QDoubleSpinBox.

Change-Id: I9f286479b821e240c8ea05c238932fc128c582bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-03-22 21:37:45 +00:00
..
qabstractbutton QAbstractButton: don't clear 'pressed' flag unless left button is released 2017-11-15 10:06:16 +00:00
qabstractscrollarea
qabstractslider testlib: start sharing common helper functions 2017-11-04 20:11:22 +00:00
qabstractspinbox testlib: start sharing common helper functions 2017-11-04 20:11:22 +00:00
qbuttongroup
qcalendarwidget
qcheckbox
qcombobox qtbase: cleanup BLACKLIST files 2018-02-13 15:20:33 +00:00
qcommandlinkbutton
qdatetimeedit Raise the upper bound on years to 9999 2017-11-30 20:19:13 +00:00
qdial
qdialogbuttonbox QDialogButtonGroup: Fix removal of deleted buttons 2017-03-02 10:42:55 +00:00
qdockwidget
qdoublespinbox Allow adaptive decimal stepping for QSpinBox and QDoubleSpinBox 2018-03-22 21:37:45 +00:00
qfocusframe
qfontcombobox Update usage of QFontMetrics::width() to new API 2017-12-08 15:06:32 +00:00
qframe Fusion: desaturate the brown shades 2017-04-27 16:03:15 +00:00
qgroupbox QGroupBox tests: Correct spelling of "release" 2017-03-22 18:30:14 +00:00
qkeysequenceedit
qlabel Fix QLabel crash if buddy's lifetime is too short 2018-03-08 22:36:49 +00:00
qlcdnumber
qlineedit Merge remote-tracking branch 'origin/5.11' into dev 2018-02-21 09:41:47 +01:00
qmainwindow Ensure result of all QTest::qWaitFor are verified 2017-10-05 15:15:36 +00:00
qmdiarea Blacklist flaky tst_QMdiArea test 2017-06-13 16:00:58 +00:00
qmdisubwindow Blacklist tst_QMdiSubWindow::setOpaqueResizeAndMove on macOS 10.12 2018-02-15 13:17:48 +00:00
qmenu tests: Refactor cleanup tst_QMenu::QTBUG47515_widgetActionEnterLeave 2018-02-14 07:13:42 +00:00
qmenubar Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qopenglwidget qtbase: cleanup BLACKLIST files 2018-02-13 15:20:33 +00:00
qplaintextedit Update usage of QFontMetrics::width() to new API 2017-12-08 15:06:32 +00:00
qprogressbar Update usage of QFontMetrics::width() to new API 2017-12-08 15:06:32 +00:00
qpushbutton Ensure result of all QTest::qWaitFor are verified 2017-10-05 15:15:36 +00:00
qradiobutton
qscrollarea
qscrollbar Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qsizegrip
qslider
qspinbox Allow adaptive decimal stepping for QSpinBox and QDoubleSpinBox 2018-03-22 21:37:45 +00:00
qsplashscreen
qsplitter tst_QSplitter::replaceWidget: explicit wait for events 2018-01-26 19:58:17 +00:00
qstackedwidget Ensure result of all QTest::qWaitFor are verified 2017-10-05 15:15:36 +00:00
qstatusbar
qtabbar qtbase: cleanup BLACKLIST files 2018-02-13 15:20:33 +00:00
qtabwidget QTabWidget: Do not add tabbar size during sizeHint() when it is hidden 2018-03-07 18:36:06 +00:00
qtextbrowser
qtextedit tests: Fix warnings about inconsistent override 2017-10-27 20:01:25 +00:00
qtoolbar
qtoolbox
qtoolbutton macOS: Blacklist tst_QToolButton::task176137_autoRepeatOfAction() 2017-07-03 07:50:41 +00:00
widgets.pro Widgets: Update micro focus in QLineEdit and friends 2017-02-17 17:09:50 +00:00