diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-11-25 00:56:20 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-11-29 05:33:03 (GMT) |
commit | b604dc0b77a3a4b9001d682925006a3438e00cb7 (patch) | |
tree | 3b8944202a442d3d6328de854de2fc9610f7e438 /doc/src/snippets/declarative | |
parent | c874a2a97101e506148e852debc23a898691b892 (diff) | |
download | Qt-b604dc0b77a3a4b9001d682925006a3438e00cb7.zip Qt-b604dc0b77a3a4b9001d682925006a3438e00cb7.tar.gz Qt-b604dc0b77a3a4b9001d682925006a3438e00cb7.tar.bz2 |
Move KeyNavigation example to snippets, plus some doc rewording
Diffstat (limited to 'doc/src/snippets/declarative')
-rw-r--r-- | doc/src/snippets/declarative/keynavigation.qml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/keynavigation.qml b/doc/src/snippets/declarative/keynavigation.qml new file mode 100644 index 0000000..d72bb3a --- /dev/null +++ b/doc/src/snippets/declarative/keynavigation.qml @@ -0,0 +1,45 @@ +//![0] +import QtQuick 1.0 + +Grid { + width: 100; height: 100 + columns: 2 + + Rectangle { + id: topLeft + width: 50; height: 50 + color: focus ? "red" : "lightgray" + focus: true + + KeyNavigation.right: topRight + KeyNavigation.down: bottomLeft + } + + Rectangle { + id: topRight + width: 50; height: 50 + color: focus ? "red" : "lightgray" + + KeyNavigation.left: topLeft + KeyNavigation.down: bottomRight + } + + Rectangle { + id: bottomLeft + width: 50; height: 50 + color: focus ? "red" : "lightgray" + + KeyNavigation.right: bottomRight + KeyNavigation.up: topLeft + } + + Rectangle { + id: bottomRight + width: 50; height: 50 + color: focus ? "red" : "lightgray" + + KeyNavigation.left: bottomLeft + KeyNavigation.up: topRight + } +} +//![0] |