summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
index c117aa4..0bc459e 100644
--- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
@@ -212,6 +212,7 @@ private slots:
void task221955_selectedEditor();
void task250754_fontChange();
+ void task200665_itemEntered();
};
class MyAbstractItemDelegate : public QAbstractItemDelegate
@@ -1199,5 +1200,23 @@ void tst_QAbstractItemView::task250754_fontChange()
qApp->setStyleSheet(app_css);
}
+void tst_QAbstractItemView::task200665_itemEntered()
+{
+ //we test that view will emit entered
+ //when the scrollbar move but not the mouse itself
+ QStandardItemModel model(1000,1);
+ QListView view;
+ view.setModel(&model);
+ view.show();
+ QTest::qWait(200);
+ QRect rect = view.visualRect(model.index(0,0));
+ QCursor::setPos( view.viewport()->mapToGlobal(rect.center()) );
+ QSignalSpy spy(&view, SIGNAL(entered(QModelIndex)));
+ view.verticalScrollBar()->setValue(view.verticalScrollBar()->maximum());
+ QCOMPARE(spy.count(), 1);
+
+}
+
+
QTEST_MAIN(tst_QAbstractItemView)
#include "tst_qabstractitemview.moc"