diff options
author | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-11-06 11:47:36 +0200 |
---|---|---|
committer | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-12-19 09:43:11 +0000 |
commit | 96158b46afbe4a71794206deacdc58e8022c57ff (patch) | |
tree | 11ca8c3d5b90ed580db35de80d89717acfca34a4 /tests/auto/quick/qquickshortcut/data | |
parent | e8570bd1af74724b6fae1ac8a2d8bbdfee7a6504 (diff) |
Add test to QQuickShortcut when render window is used
Add auto test for shortcuts when render window is used to
draw QQuickShortcut.
Task-number: QTBUG-64548
Change-Id: If2eb1f5618ae5f21477cc239acb42bc73ca7ec99
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickshortcut/data')
-rw-r--r-- | tests/auto/quick/qquickshortcut/data/shortcutsRect.qml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickshortcut/data/shortcutsRect.qml b/tests/auto/quick/qquickshortcut/data/shortcutsRect.qml new file mode 100644 index 0000000000..9aced4e530 --- /dev/null +++ b/tests/auto/quick/qquickshortcut/data/shortcutsRect.qml @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2017 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.5 + +Rectangle { + width: 300 + height: 300 + + property string activatedShortcut + property string ambiguousShortcut + + property alias shortcuts: repeater.model + + Repeater { + id: repeater + + Item { + Shortcut { + sequence: modelData.sequence + enabled: modelData.enabled + autoRepeat: modelData.autoRepeat + context: modelData.context + onActivated: activatedShortcut = sequence + onActivatedAmbiguously: ambiguousShortcut = sequence + } + } + } +} |