From 7b7322c497042b738507108bcd54fa37694392d9 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 14 Dec 2016 13:49:26 +0100 Subject: ListView, GridView: fix missing keyNavigationEnabled property Before this patch, this code: import QtQuick 2.7 ListView { keyNavigationEnabled: true } Would cause this error: "ListView.keyNavigationEnabled" is not available in QtQuick 2.7. This is because ItemView was missing a revision: qmlRegisterUncreatableType( uri, 2, 7, "ItemView", QQuickItemView::tr("ItemView is an abstract base class")); Task-number: QTBUG-57621 Change-Id: Ia00cb7446a0d83278760f3aa361db5a864661bc6 Reviewed-by: Robin Burchell --- .../quick/qquicklistview/data/keyNavigationEnabled.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml (limited to 'tests/auto/quick/qquicklistview/data') diff --git a/tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml b/tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml new file mode 100644 index 0000000000..943b0aadbd --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/keyNavigationEnabled.qml @@ -0,0 +1,14 @@ +import QtQuick 2.7 + +ListView { + width: 400 + height: 400 + model: 100 + // Ensure that the property is available in QML. + onKeyNavigationEnabledChanged: {} + delegate: Rectangle { + height: 40 + width: 400 + color: index % 2 ? "lightsteelblue" : "lightgray" + } +} -- cgit v1.2.3