Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0
-
None
-
9812a9cc1e71b0a3d8f25c0db2457f8673e53054
Description
SwipeDelegate should only emit clicked when it's clicked like a button. If a swipe is initiated, clicked() should not be emitted:
- swipe to open -> emits clicked on release
- swipe to close -> emits clicked on release
import QtQuick 2.5 import QtQuick.Window 2.2 import QtQuick.Controls 2.0 Window { id: window width: 360 height: 480 visible: true ListView { model: 10 anchors.fill: parent delegate: SwipeDelegate { text: index width: parent.width swipe.left: Label { text: "Left" color: "white" leftPadding: 20 verticalAlignment: Qt.AlignVCenter width: parent.width / 2 height: parent.height background: Rectangle { color: "green" } } onClicked: console.log("Clicked", swipe.position) } } }
Attachments
For Gerrit Dashboard: QTBUG-57285 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
172626,15 | SwipeDelegate: don't emit clicked when released outside | 5.7 | qt/qtquickcontrols2 | Status: MERGED | -2 | 0 |