From a972a4141f62ee27157b1ee3cbd432724d829c69 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 4 May 2021 17:42:30 +0200 Subject: Map window coordinates to the same coordinate system as the QPointerEvent point If the window has parent windows its geometry should be mapped to the global coordinates before check if it contains the point coordinates. Fixes: QTBUG-91716 Change-Id: I300547361dbe895b67caeee0d47f416426444552 Reviewed-by: Shawn Rutledge Reviewed-by: Qt CI Bot (cherry picked from commit c740a9d30571079fa22fd26cb8e72df6ca28c7b2) Reviewed-by: Alexey Edelev --- .../qquicktaphandler/data/simpleTapHandler.qml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/auto/quick/pointerhandlers/qquicktaphandler/data/simpleTapHandler.qml (limited to 'tests/auto/quick/pointerhandlers/qquicktaphandler/data/simpleTapHandler.qml') diff --git a/tests/auto/quick/pointerhandlers/qquicktaphandler/data/simpleTapHandler.qml b/tests/auto/quick/pointerhandlers/qquicktaphandler/data/simpleTapHandler.qml new file mode 100644 index 0000000000..1c18133f92 --- /dev/null +++ b/tests/auto/quick/pointerhandlers/qquicktaphandler/data/simpleTapHandler.qml @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite 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.12 + +Item { + id: root + width: 100 + height: 100 + property int tapCount: 0 + TapHandler { + onTapped: { ++root.tapCount } + } +} -- cgit v1.2.3