Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.13.0, 5.15.2
-
None
-
Dell XPS 15 9560, Windows 10
Description
Example code:
import QtQuick 2.13 import QtQuick.Controls 2.13 ApplicationWindow { visible: true width: 640 height: 480 Rectangle { y: 150 width: 50 height: 50 color: "blue" TapHandler { grabPermissions: PointerHandler.TakeOverForbidden } } Rectangle { id: rectangle x: 100 y: 100 width: 200 height: 200 color: dragHandler.active ? "red" : "orange" opacity: 0.8 DragHandler { id: dragHandler grabPermissions: PointerHandler.TakeOverForbidden } } }
Steps to reproduce of the problems:
- Press and hold mouse on the blue rectangle and drag in the direction of orange rectangle
or:
- Press and hold mouse outside of the blue or orange rectangles and drag in the direction of orange rectangle
Results:
It is not possible to prevent grab of the event in the DragHandler if the event started outside the area of the orange rectangle. This type of DragHandler behavior can lead to side effects and unwanted activation of some DragHandler, so it would be good to have some mechanism to control this behavior if it is not desired. Aside from this problem, the orange rectangle jumps unsightly when dragging begins (see: https://bugreports.qt.io/browse/QTBUG-77638)