summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtableview
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtableview')
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 35fba52..54e32218 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -201,6 +201,7 @@ private slots:
void taskQTBUG_5237_wheelEventOnHeader();
void taskQTBUG_8585_crashForNoGoodReason();
void taskQTBUG_7774_RtoLVisualRegionForSelection();
+ void taskQTBUG_8777_scrollToSpans();
void mouseWheel_data();
void mouseWheel();
@@ -3994,7 +3995,6 @@ void tst_QTableView::taskQTBUG_8585_crashForNoGoodReason()
}
}
-
class TableView7774 : public QTableView
{
public:
@@ -4020,5 +4020,19 @@ void tst_QTableView::taskQTBUG_7774_RtoLVisualRegionForSelection()
QCOMPARE(region.rects().at(0), view.visualRect(range.topLeft()) | view.visualRect(range.bottomRight()));
}
+void tst_QTableView::taskQTBUG_8777_scrollToSpans()
+{
+ QTableWidget table(75,5);
+ for (int i=0; i<50; i++)
+ table.setSpan(2+i, 0, 1, 5);
+ table.setCurrentCell(0,2);
+ table.show();
+
+ for (int i = 0; i < 45; ++i)
+ QTest::keyClick(&table, Qt::Key_Down);
+
+ QVERIFY(table.verticalScrollBar()->value() > 10);
+}
+
QTEST_MAIN(tst_QTableView)
#include "tst_qtableview.moc"