aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickshortcut/data
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-22 07:31:37 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-16 17:33:41 +0000
commita7fd83cd0cecb789006baecabfc6a49c49b7f48c (patch)
tree069fbf66e53c046770d0083197ba822efe884f45 /tests/auto/quick/qquickshortcut/data
parente21a699dca60b816a48956c26e1366cfd3ff04dc (diff)
Shortcut: add support for multiple key sequences
[ChangeLog][QtQuick][Shortcut] Added support for multiple shortcut sequences. Previously it was possible to specify a single sequence that could consist of up to four key presses. Now it is possible to specify multiple sequences that can each consist of multiple key presses. Change-Id: Id12f25da2f352cc542ec776049d8e81593951d41 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickshortcut/data')
-rw-r--r--tests/auto/quick/qquickshortcut/data/multiple.qml45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickshortcut/data/multiple.qml b/tests/auto/quick/qquickshortcut/data/multiple.qml
new file mode 100644
index 0000000000..2b58327cf0
--- /dev/null
+++ b/tests/auto/quick/qquickshortcut/data/multiple.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQuick module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Window 2.2
+
+Window {
+ id: window
+
+ width: 300
+ height: 300
+
+ property bool activated: false
+ property alias shortcut: shortcut
+
+ Shortcut {
+ id: shortcut
+ onActivated: window.activated = true
+ }
+}