Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
6eaa95662c2d4ba287ac5d1de5ec49bd3a9f59e6
Description
For example, let's make a Button draggable:
import QtQuick 2.0 import Qt.labs.handlers 1.0 import QtQuick.Controls 2.2 ApplicationWindow { visible: true width: 200; height: 200 CheckBox { id: draggableCB anchors.right: parent.right text: "draggable" checked: true } Button { width: 100; height: 50 text: "Drag me" onClicked: console.log("clicked") DragHandler { enabled: draggableCB.checked } } }
It should be possible to tap the button as usual, such that it looks visually pressed when it's pressed, and emits its clicked signal on release. It should be possible to drag it. And as soon as the DragHandler takes over the exclusive grab and becomes active, the Button should no longer be pressed. We've seen several possible bugs with this already, depending on which patches we've been trying out in qtdeclarative: the Button can't be dragged at all; the Button can be dragged but can't be pressed at all; the Button is pressed and can be dragged but stays pressed even after the point is released; it works right for touch but not for mouse; vice-versa; etc.
But this is not the only scenario. Hopefully most of the ones we can think of can be fixed during the course of the 5.10 releases.
Attachments
Issue Links
- depends on
-
QTBUG-84231 TapHandler in parent of an event-handling Item always declines the press event
- Reported
- relates to
-
QTBUG-71218 DragHandler in a Controls 2 Button: button stays in pressed state after drag begins
- Closed
-
QTBUG-73262 it's confusing that TapHandler.gesturePolicy affects event propagation
- Reported
-
QTBUG-103604 TapHandler and DragHandler are broken inside Control
- Reported