aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-12-14 13:49:26 +0100
committerMitch Curtis <mitch.curtis@qt.io>2016-12-20 11:51:24 +0000
commit7b7322c497042b738507108bcd54fa37694392d9 (patch)
tree48645d4ea2b64179b84777f46b9b3710eab2d50a /tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml
parentddba1d1281c4a50dacacbd5478716fe55f984058 (diff)
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<QQuickItemView, 7>( uri, 2, 7, "ItemView", QQuickItemView::tr("ItemView is an abstract base class")); Task-number: QTBUG-57621 Change-Id: Ia00cb7446a0d83278760f3aa361db5a864661bc6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml')
-rw-r--r--tests/auto/quick/qquickgridview/data/keyNavigationEnabled.qml12
1 files changed, 12 insertions, 0 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" }
+}