|
2013-07-09
, 16:14
|
Posts: 650 |
Thanked: 619 times |
Joined on Nov 2009
|
#2
|
ContextMenu { MenuItem { text: qsTr("Delete"); onClicked: { posEditListView.currentItem.remorseDeleteAction(); } } }
The Following User Says Thank You to sony123 For This Useful Post: | ||
I followed the example on the reference, declared the contextmenu as a component and instantiated it within the list delegate. The problem I have now is, I cannot access the item's property (e.g. I want to invoke the RemorseItem) within the ContextMenu. One thing I tried was to connect the 'activated' signal from ContextMenu to a function for executing the RemorseItem within the delegate. But the function always got triggered when the ContextMenu was instantiated, not when the delete entry was pressed.
The codes look like this:
Last edited by sony123; 2013-07-09 at 16:14.