aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml
index 0d1c89f0..aadbcdec 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -135,6 +135,8 @@ ApplicationWindow {
ListView {
id: listView
+
+ focus: true
currentIndex: -1
anchors.fill: parent
@@ -143,10 +145,8 @@ ApplicationWindow {
text: model.title
highlighted: ListView.isCurrentItem
onClicked: {
- if (listView.currentIndex != index) {
- listView.currentIndex = index
- stackView.push(model.source)
- }
+ listView.currentIndex = index
+ stackView.push(model.source)
drawer.close()
}
}