summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-11-07 19:06:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-26 09:40:59 +0200
commit934f06220391eb0e0ebf66a2eb037f48adb4c43c (patch)
treef8424122967d504cef4d31d7d26135497c793dc6 /tests
parent94dca6d10c40067a7bc90382b741062123c4402d (diff)
QAIV - Fix scollbars with ScrollPerPixel to scroll 1 pixel.
The documentation says that we scroll one pixel Quote: "QAbstractItemView::ScrollPerPixel (value 1)" "The view will scroll the contents one pixel at a time." However until now Qt has tried to be smarter than the documentation, but is actually getting in the way of the user, where a manual set value to setSingleStep will continuingly be overwritten (on e.g resize). This patch ensures the behavior described in the documentation for the vertical headers - and leaves the control to the user. [ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews scrollbars will now by default only scroll 1 pixel when scrollMode is set to scrollPerPixel. That is it will (when scrollMode is scrollPerPixel) do what is stated in the documentation, and no longer automatically adjust the scrollbars singleStep. The user can now control that value. Task-number: QTBUG-7232 Change-Id: I8a61d3100be65d0c4ee32aad58caed019aa2669c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index dfb780c8fa..76ac6bcf19 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -3702,7 +3702,7 @@ void tst_QTableView::mouseWheel_data()
<< 10 + qApp->wheelScrollLines() << 10 + qApp->wheelScrollLines();
QTest::newRow("scroll down per pixel")
<< int(QAbstractItemView::ScrollPerPixel) << -120
- << 10 + qApp->wheelScrollLines() * 89 << 10 + qApp->wheelScrollLines() * 28;
+ << 10 + qApp->wheelScrollLines() << 10 + qApp->wheelScrollLines();
}
void tst_QTableView::mouseWheel()