From 6fd358d2fd82cd06dbe25a019e7de19817ba3017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20H=C3=B6ltt=C3=A4?= Date: Fri, 7 Dec 2018 10:52:06 +0100 Subject: Add available-function for a cursor navigable Availability means that the item first of all accepting cursor, visible, enabled, and within its parent's geometry. This value is meant for the algorithms to define if item is navigable. --- DemoApplication/main.qml | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'DemoApplication') diff --git a/DemoApplication/main.qml b/DemoApplication/main.qml index 58f1af5..bfb7840 100644 --- a/DemoApplication/main.qml +++ b/DemoApplication/main.qml @@ -13,28 +13,34 @@ ApplicationWindow { visible: true title: qsTr("Cursor Navigation Demo Application") - header: TabBar { - id: tabBar - width: parent.width - CNTabButton { - text: qsTr("Page 1") - } - CNTabButton { - text: qsTr("Page 2") - } - CNTabButton { - text: qsTr("Page 3") - } - CNTabButton { - text: qsTr("Page 4") - } - CNTabButton { - text: qsTr("Page 5") - } - CNTabButton { - text: qsTr("Map") + header: + + TabBar { + id: tabBar + width: window.width + + CursorNavigation.acceptsCursor: true + + CNTabButton { + text: qsTr("Page 1") + focus: true + } + CNTabButton { + text: qsTr("Page 2") + } + CNTabButton { + text: qsTr("Page 3") + } + CNTabButton { + text: qsTr("Page 4") + } + CNTabButton { + text: qsTr("Page 5") + } + CNTabButton { + text: qsTr("Map") + } } - } contentData: StackLayout { anchors.fill: parent -- cgit v1.2.3