Hi,
I got some elements on flickable and wanted to add possibility to move that elements. Decided to use pressAndHold signal from MouseArea to activate drag but got a problem with disableing it.
It activates really nice and after holding a finger on mouseArea it starts draging but it never disables, I mean i cannot flick on that element anymore because it drags instead of flicking flickable.
Any suggestions how to fix it?
Here is a part of code.
MouseArea{
property bool dragActive: false
id: mouseA
x: 0
y: 0
anchors.fill: parent
onClicked: {
buttonClicked()
}
onReleased: {
dragActive = false
}
onCanceled: {
dragActive = false
}
onPressAndHold: {
dragActive = true
}
drag.target: dragActive ? parent : 0
}
Thanks in advance
↧