diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-10-31 13:08:12 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-10-31 13:08:12 +0100 |
commit | 10972ca272ae59fbe0f18eef6d9237fbd4aaca86 (patch) | |
tree | 4c2766b234368b2e401dc955bd44faf8088deada /examples | |
parent | e09a8591990e5281929ca2a7bb180bb3a35556ba (diff) | |
parent | 548b0bdd0f57c2209c8cbd7ac4ecda204cf69a2e (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
src/imports/controls/CheckIndicator.qml
src/imports/controls/RadioIndicator.qml
src/imports/controls/RangeSlider.qml
src/imports/controls/Slider.qml
src/imports/controls/SwitchIndicator.qml
Change-Id: I32612d2f905ffa02dbaedbb1f84c8237fbd66db3
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quickcontrols2/gallery/gallery.qml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index c4b6c1a1..89c0c607 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -57,6 +57,15 @@ ApplicationWindow { property string style: "Default" } + Shortcut { + sequence: "Esc" + enabled: stackView.depth > 1 + onActivated: { + stackView.pop() + listView.currentIndex = -1 + } + } + header: ToolBar { Material.foreground: "white" @@ -126,6 +135,8 @@ ApplicationWindow { ListView { id: listView + + focus: true currentIndex: -1 anchors.fill: parent @@ -134,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() } } |