Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.4.2, 6.5.2
Description
The following example tries to nail down the problem, while the original code is a bit more complex. The original code is in turn the reason why I need to set the gesturePolicy to TapHandler.WithinBounds.
There are two button like objects that overlap for some reason (the original has a flickable and an overlaying button). The problem is, that clicking the overlay button also triggers the element below (on the first click after the mouse has been moved).
import QtQuick import QtQuick.Controls.Material Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { id: superButton width: label.width + 20 height: normalButton.height color: "green" Text { id: label text: "Superbutton with click magnetic super power" color: "white" anchors.centerIn: parent } TapHandler { onTapped: () => console.log("'green' tapped") grabPermissions: PointerHandler.TakeOverForbidden gesturePolicy: TapHandler.WithinBounds } } Button { id: normalButton text: "Tap me!" onClicked: () => console.log("'normal' tapped") } }
The expected behaviour is, that only the on top element receives the event in the given configuration.
Attachments
Issue Links
- is replaced by
-
QTBUG-117426 Touch devices: ungrab handled incorrectly
-
- Reported
-