diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2013-06-12 23:48:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-20 23:59:31 +0200 |
commit | ffbf8d724f39e9c8d05ae2049e8b79a61570e235 (patch) | |
tree | b1bdf614d2063eb71cc50f0f21d58076e8f21a72 /examples/quick | |
parent | 0a3192fe4100dd790dc1467cc2cab200fb996ab0 (diff) | |
download | qtquickcontrols-ffbf8d724f39e9c8d05ae2049e8b79a61570e235.tar.gz |
Support StandardKeys for Action/MenuItem::shortcut
Change-Id: I2054a59fcda26795721e5d7d04cc644220da372b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/controls/gallery/main.qml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/quick/controls/gallery/main.qml b/examples/quick/controls/gallery/main.qml index ec00627b..32e04efd 100644 --- a/examples/quick/controls/gallery/main.qml +++ b/examples/quick/controls/gallery/main.qml @@ -42,7 +42,7 @@ -import QtQuick 2.1 +import QtQuick 2.2 import QtQuick.Controls 1.0 import QtQuick.Layouts 1.0 import QtQuick.Dialogs 1.0 @@ -73,7 +73,7 @@ ApplicationWindow { Action { id: openAction text: "&Open" - shortcut: "Ctrl+O" + shortcut: StandardKey.Open iconSource: "images/document-open.png" onTriggered: fileDialog.open() tooltip: "Open an image" @@ -82,7 +82,7 @@ ApplicationWindow { Action { id: copyAction text: "&Copy" - shortcut: "Ctrl+C" + shortcut: StandardKey.Copy iconName: "edit-copy" enabled: (!!activeFocusItem && !!activeFocusItem["copy"]) onTriggered: activeFocusItem.copy() @@ -91,7 +91,7 @@ ApplicationWindow { Action { id: cutAction text: "Cu&t" - shortcut: "Ctrl+X" + shortcut: StandardKey.Cut iconName: "edit-cut" enabled: (!!activeFocusItem && !!activeFocusItem["cut"]) onTriggered: activeFocusItem.cut() @@ -100,7 +100,7 @@ ApplicationWindow { Action { id: pasteAction text: "&Paste" - shortcut: "Ctrl+V" + shortcut: StandardKey.Paste iconName: "edit-paste" enabled: (!!activeFocusItem && !!activeFocusItem["paste"]) onTriggered: activeFocusItem.paste() @@ -185,7 +185,7 @@ ApplicationWindow { MenuItem { action: openAction } MenuItem { text: "Close" - shortcut: "Ctrl+Q" + shortcut: StandardKey.Quit onTriggered: Qt.quit() } } |