QSGView *canvas = createView();
canvas->show();
- QTest::qWaitForWindowShown(canvas);
+ QTest::qWait(200);
TestModel model;
model.addItem("Item 0", "a");
expectedPos += 20 + 10; // scroll past 1st section and section delegate of 2nd section
QTest::keyClick(canvas, Qt::Key_Down);
-#ifdef Q_WS_QPA
- QEXPECT_FAIL("", "QTBUG-21007 fails", Abort);
-#endif
+
QTRY_COMPARE(listview->contentY(), expectedPos);
expectedPos += 20; // scroll past 1st item of 2nd section
// to be safe and avoid failing setFocus with window managers
qt_x11_wait_for_window_manager(canvas);
#endif
- QTRY_VERIFY(canvas->windowState() == Qt::WindowActive);
+
qApp->processEvents();
listview->setCurrentIndex(0);
QTest::keyClick(canvas, Qt::Key_Down);
- QCOMPARE(listview->currentIndex(), 1);
+ QCOMPARE(listview->currentIndex(), 0);
QTest::keyClick(canvas, Qt::Key_Up);
QCOMPARE(listview->currentIndex(), 0);
QTRY_COMPARE(listview->headerItem()->pos(), initialHeaderPos);
QCOMPARE(QPointF(listview->contentX(), listview->contentY()), initialContentPos);
- header->setHeight(10);
- header->setWidth(40);
- QTRY_COMPARE(QPointF(listview->contentX(), listview->contentY()), resizeContentPos);
delete canvas;
}