diff options
Diffstat (limited to 'examples/quickcontrols2/gallery/gallery.qml')
-rw-r--r-- | examples/quickcontrols2/gallery/gallery.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index 44987ada..95fc739f 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -62,6 +62,15 @@ ApplicationWindow { visible: true title: "Qt Quick Controls 2" + function help() + { + var url = "https://doc.qt.io/qt-5/" + + (stackView.depth > 1 + ? "qml-qtquick-controls2-" + stackView.currentItem.control + ".html" + : "qtquick-controls2-qmlmodule.html"); + Qt.openUrlExternally(url) + } + Settings { id: settings property string style: "Default" @@ -73,6 +82,11 @@ ApplicationWindow { onActivated: navigateBackAction.trigger() } + Shortcut { + sequence: StandardKey.HelpContents + onActivated: help() + } + Action { id: navigateBackAction icon.name: stackView.depth > 1 ? "back" : "drawer" @@ -131,6 +145,10 @@ ApplicationWindow { onTriggered: settingsDialog.open() } Action { + text: "Help" + onTriggered: help() + } + Action { text: "About" onTriggered: aboutDialog.open() } |