qt5base-lts/tests/auto/widgets/itemviews
Thorbjørn Lund Martsum 410aa20f07 QAIV - allow users to control single step in ScrollPerPixel mode
The documentation says that we scroll one pixel, but changing the
behavior in 934f062203 to do that
was not well received.

People were relying on the undocumented behavior - and the new behavior
was considered to be a regression. (Nobody called setSingleStep since
Qt in many cases provide a reasonable singleStep - which implied that their
programs scrolled with 1 pixel which was quite slow). Furthermore getting
the old behavior (auto set of single step) was nearly impossible.

However the revert (done in 0e69230d02)
gets us back to QScrollbar::setSingleStep not working in pixel scroll mode
(even without it being documented - but we should also have a working API
rather than documenting that it is not working)

The previous approach was directly prevented Qt from changing
single step (on e.g resize) at all. This patch only prevents Qt from
changing when a user explicitly has called the function
QScrollBar::setSingleStep (in pixel scroll mode).

That is we expect that calls to setSingleStep means that the user actually
wants to set the singleStep and doesn't want Qt to control that value.

Furthermore it is possible to switch back to the automatically adjusted
singlestep with QScrollBar::setSingleStep(-1).

[ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews
when scrollMode is set to scrollPerPixel, it is now possible to
change the single step. Qt will automatically adjust the single step
until setSingleStep is called. When setSingleStep is called it will
however respect the set and stop doing automatic changes of the value.
Calling setSingleStep(-1) will switch mode back to automatic adjust.

Task-number: QTBUG-7232
Change-Id: Ibfe0caa9751d3bcc11bfc6e0654a3d1ac35ac8ae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-12-09 17:53:59 +00:00
..
qabstractitemview Remove remaining support for Blackberry 2015-11-21 15:38:39 +00:00
qcolumnview tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
qdatawidgetmapper tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
qdirmodel Tests: Fix single-character string literals. 2015-10-13 18:14:27 +00:00
qfileiconprovider Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
qheaderview Merge remote-tracking branch 'origin/5.6' into dev 2015-10-23 14:45:03 +02:00
qitemdelegate tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
qitemeditorfactory Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
qitemview tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
qlistview QAIV - allow users to control single step in ScrollPerPixel mode 2015-12-09 17:53:59 +00:00
qlistwidget tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
qtableview QAIV - allow users to control single step in ScrollPerPixel mode 2015-12-09 17:53:59 +00:00
qtablewidget tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
qtreeview QAIV - allow users to control single step in ScrollPerPixel mode 2015-12-09 17:53:59 +00:00
qtreewidget tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
qtreewidgetitemiterator tests/auto/widgets: Remove some placeholder formatting. 2015-10-19 12:39:16 +00:00
itemviews.pro Move QStandardItem/QStandardItemModel to QtGui 2012-06-29 22:42:19 +02:00