2017-03-31 16:36:53 +00:00
|
|
|
/****************************************************************************
|
|
|
|
**
|
2019-09-12 07:41:38 +00:00
|
|
|
** Copyright (C) 2019 The Qt Company Ltd.
|
2017-03-31 16:36:53 +00:00
|
|
|
** Contact: https://www.qt.io/licensing/
|
|
|
|
**
|
|
|
|
** This file is part of the manual tests of the Qt Toolkit.
|
|
|
|
**
|
2017-11-15 15:29:18 +00:00
|
|
|
** $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.
|
2017-03-31 16:36:53 +00:00
|
|
|
**
|
|
|
|
** $QT_END_LICENSE$
|
|
|
|
**
|
|
|
|
****************************************************************************/
|
|
|
|
|
2018-06-25 16:12:29 +00:00
|
|
|
import QtQuick 2.12
|
2017-03-31 16:36:53 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
width: 200
|
|
|
|
height: 200
|
|
|
|
TapHandler {
|
|
|
|
acceptedModifiers: Qt.ControlModifier
|
|
|
|
onTapped: console.log("control-tapped")
|
|
|
|
}
|
|
|
|
TapHandler {
|
|
|
|
acceptedModifiers: Qt.NoModifier
|
|
|
|
onTapped: console.log("tapped with no modifiers")
|
|
|
|
}
|
|
|
|
TapHandler {
|
2019-09-12 07:41:38 +00:00
|
|
|
onTapped:
|
|
|
|
switch (point.modifiers) {
|
|
|
|
case Qt.ControlModifier | Qt.AltModifier:
|
|
|
|
console.log("CTRL+ALT");
|
|
|
|
break;
|
|
|
|
case Qt.ControlModifier | Qt.AltModifier | Qt.MetaModifier:
|
|
|
|
console.log("CTRL+META+ALT");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
console.log("other modifiers", point.modifiers)
|
|
|
|
}
|
2017-03-31 16:36:53 +00:00
|
|
|
}
|
|
|
|
}
|