summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlistview/tst_qlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qlistview/tst_qlistview.cpp')
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 2281fb7..c598aeb 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -424,6 +424,18 @@ void tst_QListView::hideRows()
view.setRowHidden(0, false);
QVERIFY(!view.isRowHidden(0));
+ QStandardItemModel sim(0);
+ QStandardItem *root = new QStandardItem("Root row");
+ for (int i=0;i<5;i++)
+ root->appendRow(new QStandardItem(QString("Row %1").arg(i)));
+ sim.appendRow(root);
+ view.setModel(&sim);
+ view.setRootIndex(root->index());
+ QVERIFY(!view.isRowHidden(0));
+ view.setRowHidden(0, true);
+ QVERIFY(view.isRowHidden(0));
+ view.setRowHidden(0, false);
+ QVERIFY(!view.isRowHidden(0));
}