Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.1
-
None
-
Desktop Qt 6.6.1 MSVC2019 64-bit
Description
The code below reproduces the issue. You need to long-press one of the blue squares, then a popup will appear. The popup contains a slider. Quite often when trying to drag the Slider's handle the Flickable (TableView) will kick in instead and start moving around its entire content. It's easier to trigger this behavior when dragging the handle vertically but it also happens horizontally / in arbitrary direction. IMHO this should not happen and looks like some kind of a weird interaction between the Slider, the DragHandler and the Flickable. Thank you in advance for your help. PS. I believe this happens when the point where you click on the slider is above something with a DragHandler in the background. Probably a duplicate of:
import QtQuick import QtQuick.Controls import QtQuick.Layouts import QtQuick.Shapes Window { width: 640 height: 480 visible: true title: qsTr("Hello World") TableView { anchors.fill: parent model: 5 delegate: ColumnLayout { Label { text: "ABC" font.pixelSize: 224 } Slider { from: 1 to: 10 stepSize: 1 snapMode: Slider.SnapAlways value: 5 } Rectangle { x: 0 y: 0 width: 200 height: 100 color: "red" Rectangle { x: 100 width: 100 height: 100 color: "green" Repeater { model: 3 delegate: Shape { required property var index y: index * 50 containsMode: Shape.FillContains ShapePath { startX: 0; startY: 0 PathLine { x: 50; y: 0 } PathLine { x: 50; y: 50 } PathLine { x: 0; y: 50 } PathLine { x: 0; y: 0 } fillColor: "blue" } DragHandler { target: null onActiveChanged: { } } TapHandler { onLongPressed: { var pt = mapToItem(Overlay.overlay, point.position) popup.x = pt.x popup.y = pt.y popup.open() } } Popup { id: popup ButtonGroup { id: btnGroup } parent: Overlay.overlay ColumnLayout { Button { ButtonGroup.group: btnGroup text: "Whatever" checkable: true checked: true } Slider { from: 1 to: 10 stepSize: 1 snapMode: Slider.SnapAlways value: 5 } } } } } } } } ScrollBar.horizontal: ScrollBar {} ScrollBar.vertical: ScrollBar {} } }
Attachments
Issue Links
- relates to
-
QTBUG-87815 DragHandler events are caught through popups
- Open