aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickgridview')
-rw-r--r--tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml12
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp2
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml b/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml
new file mode 100644
index 0000000000..868611760e
--- /dev/null
+++ b/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml
@@ -0,0 +1,12 @@
+import QtQuick 2.7
+
+GridView {
+ width: 405
+ height: 200
+ cellWidth: width / 9
+ cellHeight: height / 2
+ // Ensure that the property is available in QML.
+ onKeyNavigationEnabledChanged: {}
+ model: 18
+ delegate: Rectangle { objectName: "delegate"; width: 10; height: 10; color: "green" }
+}
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index 07c03a57d7..1acc36c9b0 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -6568,7 +6568,7 @@ void tst_QQuickGridView::QTBUG_45640()
void tst_QQuickGridView::keyNavigationEnabled()
{
QScopedPointer<QQuickView> window(createView());
- window->setSource(testFileUrl("gridview4.qml"));
+ window->setSource(testFileUrl("keyNavigationEnabled.qml"));
window->show();
window->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(window.data()));