From c58955328688a73bea53f65cd38dd3f07229b3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20H=C3=B6ltt=C3=A4?= Date: Tue, 4 Dec 2018 14:48:36 +0100 Subject: cursor trapping and navigation out of a scope works now as intended done by precopying the list of candidates. Could avoid extra list copies if the algorithm traversed the tree, but this is simpler and works for now --- DemoApplication/pages/Page3.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'DemoApplication') diff --git a/DemoApplication/pages/Page3.qml b/DemoApplication/pages/Page3.qml index e9c47e1..307dc50 100644 --- a/DemoApplication/pages/Page3.qml +++ b/DemoApplication/pages/Page3.qml @@ -54,6 +54,7 @@ Item { anchors.fill: parent CursorNavigation.acceptsCursor: true CursorNavigation.escapeTarget: defaultButton + CursorNavigation.trapsCursor: trapCheckBox.checked //redefine the controls for this scope //(default arrow keys will still work as well, unless reassigned here) @@ -65,7 +66,7 @@ Item { Grid { spacing: 5 columns: 2 - rows: 2 + rows: 3 CNButton { text: "sb1" @@ -83,6 +84,11 @@ Item { text: "sb4 (default focus)" focus: true } + + CNCheckBox { + id: trapCheckBox + text: "trap cursor" + } } } } -- cgit v1.2.3