diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-17 09:54:04 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-17 09:54:04 +0100 |
commit | f52b95a96cc8f36f766635f9ddb6c95fa6b3c934 (patch) | |
tree | 0a74d23575ae74e93a7b2dedb7a03827c42e8266 /examples/quickcontrols2/gallery/gallery.qml | |
parent | 2bd4f5cd587e258227c69b3124757d7b8e019c9f (diff) | |
parent | 7da5842647f75fd990f69f400f75d9b090e39306 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
Diffstat (limited to 'examples/quickcontrols2/gallery/gallery.qml')
-rw-r--r-- | examples/quickcontrols2/gallery/gallery.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index 44987ada..44090b8a 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -62,6 +62,17 @@ ApplicationWindow { visible: true title: "Qt Quick Controls 2" + function help() { + let displayingControl = listView.currentIndex !== -1 + let currentControlName = displayingControl + ? listView.model.get(listView.currentIndex).title.toLowerCase() : "" + let url = "https://doc.qt.io/qt-5/" + + (displayingControl + ? "qml-qtquick-controls2-" + currentControlName + ".html" + : "qtquick-controls2-qmlmodule.html"); + Qt.openUrlExternally(url) + } + Settings { id: settings property string style: "Default" @@ -73,6 +84,11 @@ ApplicationWindow { onActivated: navigateBackAction.trigger() } + Shortcut { + sequence: StandardKey.HelpContents + onActivated: help() + } + Action { id: navigateBackAction icon.name: stackView.depth > 1 ? "back" : "drawer" @@ -131,6 +147,10 @@ ApplicationWindow { onTriggered: settingsDialog.open() } Action { + text: "Help" + onTriggered: help() + } + Action { text: "About" onTriggered: aboutDialog.open() } |