Disable Delegate's MouseArea until ViewTransitions have finished
-
Hi all,
I have a ListView that plays "add-" and "displaced-" transitions when adding an item.
I want the item-delegate's MouseArea to be disabled until all transitions for this add have finished, to avoid complications.
What would be the best way to do this? -
Hi,
One way would be to enable/disable the MouseArea in onRunningChanged handler or bind that Transition's running to that of MouseArea's enabled.
-
[quote author="p3c0" date="1425104278"]Hi,
One way would be to enable/disable the MouseArea in onRunningChanged handler or bind that Transition's running to that of MouseArea's enabled.[/quote]
Can I even access a delegate's properties from the ListView at that time? -
No need for that just bind the runnig property.
@
ListView {
...
delegate: Rectangle {
...
MouseArea {
anchors.fill: parent
enabled: !myTrans.running
}
}
...
add: Transition {
id: myTrans
NumberAnimation { properties: "y"; from: 100; duration:5000 }
}
}
@