Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8
-
None
-
e5522fe5b (dev), ba898e79c (6.10), a3fa99fb7 (6.9), 0f02ce33f (dev), 0f7d8f920 (6.10), 4310c0644 (tqtc/lts-6.8), 08c1b73fd (6.9)
Description
If dragging starts from outside an item that includes a DragHandler, the item's DragHandler will be activated when the cursor moves over the item.
Steps to Reproduce:
- Run the snippet
- Start dragging from outside the red rectangle
- Move the cursor over the rectangle
- Then try to move it outside again
- Drop it
EXPECTED:
The rectangle's DragHandler should not be activated since dragging started from outside the rectangle
ACTUAL
- The rectangle's DragHandler is activated as long as the cursor is inside the rectangle.
- The red rectangle moves with the cursor (in case of commenting target: null)
import QtQuick import QtQuick.Window import QtQuick.Controls ApplicationWindow { id: root width: 500 height: 500 visible: true Rectangle { x: 200 y: 200 width: 100 height: 100 color: "red" DragHandler { onActiveChanged: print("active:", active) // target: null } } }
Attachments
For Gerrit Dashboard: QTBUG-127863 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
628862,10 | Only activate DragHandler if drag starts within it | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
654208,5 | Only activate DragHandler if a point is pressed within it | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
654576,2 | Add PinchHandler and DragHandler 2-finger inside/outside tests | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
654854,2 | Add PinchHandler and DragHandler 2-finger inside/outside tests | 6.10 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
654922,2 | Add PinchHandler and DragHandler 2-finger inside/outside tests | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
655563,4 | Add PinchHandler and DragHandler 2-finger inside/outside tests | tqtc/lts-6.8 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
655895,2 | Only activate DragHandler if drag starts within it | 6.10 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
656021,2 | Only activate DragHandler if drag starts within it | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
656647,1 | Only activate DragHandler if drag starts within it | tqtc/lts-6.8 | qt/tqtc-qtdeclarative | Status: INTEGRATING | +2 | 0 |