Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.8.0, 5.13, 5.15.2, 6.0.0
-
Arm-Linux custom build
Qt 5.8.0
iMX.6 QuadCore
-
69162120c735801905893f90bef38b49464f6bb9, 0f4eb2320 (dev), 6105c2fc2 (6.6), 795686be3 (6.5)
-
G&UI Finishing 2023
Description
Using SwipeDelegate as explained in the example https://doc.qt.io/qt-5/qml-qtquick-controls2-swipedelegate.html#details does not react on cklick events on the left or right component.
To test this, I ran the quickcontrols-gallery on the device an tried to click on remove in the Delegates section under SwipeDelegates. Same behaviour, nothing happens.
Running both Applications on Windows or Linux x86(_64) with X-Server works like a charm.
The main difference is that it works with the mouse, but not with the touch.
import QtQuick 2.14 import QtQuick.Controls 2.14 ApplicationWindow { width: 400 height: 400 visible: true y: 600 ListView { id: listView anchors.fill: parent model: ListModel { ListElement { sender: "Bob Bobbleton"; title: "How are you going?" } ListElement { sender: "Rug Emporium"; title: "SALE! All rugs MUST go!" } ListElement { sender: "Electric Co."; title: "Electricity bill 15/07/2016 overdue" } ListElement { sender: "Tips"; title: "Five ways this tip will save your life" } } delegate: SwipeDelegate { id: swipeDelegate objectName: "swipeDelegate" text: model.sender + " - " + model.title width: parent.width ListView.onRemove: SequentialAnimation { PropertyAction { target: swipeDelegate property: "ListView.delayRemove" value: true } NumberAnimation { target: swipeDelegate property: "height" to: 0 easing.type: Easing.InOutQuad } PropertyAction { target: swipeDelegate property: "ListView.delayRemove" value: false } } swipe.right: Label { id: deleteLabel objectName: "label" text: qsTr("Delete") color: "white" verticalAlignment: Label.AlignVCenter padding: 12 height: parent.height anchors.right: parent.right SwipeDelegate.onClicked: listView.model.remove(index) SwipeDelegate.onPressedChanged: print("SwipeDelegate.pressed", SwipeDelegate.pressed) background: Rectangle { objectName: "labelBgRect" color: deleteLabel.SwipeDelegate.pressed ? Qt.darker("tomato", 1.1) : "tomato" } } } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-69336 QML SwipeDelegate.onClicked not triggered on right/left delegates on Android
- Closed
-
QTBUG-90911 Swipe to delete (SwipeDelegate) does not work on mobile devices
- Closed
-
QTBUG-87829 [SwipeDelegate] Click events not working on touch devices
- Closed
- relates to
-
QTBUG-68970 Bad mouse move event
- Reported
-
QTBUG-45045 SIGFPE in QQuickMenu
- Closed
-
QTBUG-52472 Undefined Behaviour in qsimpledrag.cpp line 207
- Closed
- resulted from
-
QTBUG-40856 MouseArea containsMouse flag is not reset on Touch Screen
- Open