aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview.cpp
diff options
context:
space:
mode:
authorAndreas Eliasson <andreas.eliasson@qt.io>2023-01-13 12:53:20 +0100
committerAndreas Eliasson <andreas.eliasson@qt.io>2023-01-30 08:38:08 +0000
commitc63e3fac69ff063228b2fa68252c0e7fa05ca2d0 (patch)
treed71f3ef49e5958a1dc98a9e4de0d46cb665251c9 /src/quick/items/qquicktableview.cpp
parent6348cee2299b5e99cb0ce18933bc19ddc5fe57bc (diff)
Doc: Add snippet to demonstrate keyboard navigation
Add example to showcase keybord navigation for the TableView QML type together with 'current' and 'selected' properties. Fixes: QTBUG-107889 Pick-to: 6.5 6.4 Change-Id: Ie95d85aa09e574bee16c23a2dff27056bc0bcd05 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
-rw-r--r--src/quick/items/qquicktableview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index 69b0e9a992..81eddb03ce 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -259,7 +259,11 @@
to the \l selectionModel property. TableView will then use this model to manipulate
the model's \l {ItemSelectionModel::currentIndex}{currentIndex}. You can
disable keyboard navigation fully (in case you want to implement your own key
- handlers) by setting \l keyNavigationEnabled to \c false.
+ handlers) by setting \l keyNavigationEnabled to \c false. Below is an
+ example that demonstrates how to use keyboard navigation together with
+ \c current and \c selected properties:
+
+ \snippet qml/tableview/keyboard-navigation.qml 0
\section1 Copy and paste