Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.1
-
None
-
71a1288e3d9601d24545ab9650cd079c40766a63
Description
If multiple nested Flickables with non zero pressDelays filter another nested items mouse events then the outer Flickable can incorrectly receive mouse grab when the inner Flickable should get it.
In the example below if you click (press and release) on one of the list items and then move the mouse to the side some distance and attempt to drag the list down it will not move down, instead while the mouse button is held down horizontal movements will drag the outer list view side to side.
The basic reason is mouse event filtering is done from innermost item out and the inner most Flickable with a pressDelay will accept mouse press events preventing the outer items from filtering them. This means they compare the positions of move events with a previous (replayed) press event and if that's far from the start of the drag the movement appears to have exceeded the drag distance and the mouse is grabbed.
import QtQuick 2.0 Rectangle { width: 480 height: 640 ListView { width: 480 height: 640 spacing: 5 orientation: ListView.Horizontal pressDelay: 200 model: [ "red", "green", "blue" ] delegate: ListView { property color rowColor: modelData width: 320 height: 640 spacing: 5 model: 30 pressDelay: 200 delegate: Rectangle { width: 320 height: 30 radius: 3 color: rowColor MouseArea { anchors.fill: parent } } } } }
Attachments
For Gerrit Dashboard: QTBUG-37316 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
80294,3 | Filter mouse/touch events from outermost filter in. | stable | qt/qtdeclarative | Status: ABANDONED | -1 | 0 |
89994,3 | Don't allow a filtering item to block other filtering items. | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |