-
Bug
-
Resolution: Fixed
-
P4: Low
-
None
-
5.5.0
-
None
Given the following example:
import QtQuick 2.5 Item { PinchArea { id: pa anchors.top: parent.top width: parent.width height: parent.height / 2 Rectangle { anchors.fill: parent color: "red" } } MouseArea { id: ma anchors.top: pa.bottom width: parent.width height: parent.height / 2 Rectangle { color: ma.pressed ? "red" : "blue" anchors.fill: parent } } }
Place two fingers on the top half of the screen, and begin pinching. Then tap the bottom MouseArea.
Observe that the MouseArea turns red, but never turns back to blue until tapped again after the PinchArea is released.
I conjecture that this is due to PinchArea needing to handle pretty much any QTouchEvent that hits it in order to grab its own events, but it seems rather disconcerting and bad that it also ends up sending MouseArea into an inconsistent state.
I'm not sure if there's an easy solution here on the old item types. In theory, PinchArea could explicitly accept the QTouchEvent once it has begun pinching (to avoid bleeding the event on to MouseArea), avoiding pressed becoming true to begin with, but this may have unforseen consequences...