08-09-2013 03:33 AM
So, i have a standardList and currently, have context actions enabled, but i was wondering, how can we get the indexPath and its sub objects of the selectedItem.
for ListItem trigerred signal, i got it working by:
var selectedItem = dataModel.data(indexPath);
and if I want to invoke functions for that dataModel, i would just use:
if I do something similar in Context Actions, i get an error "selectedItem is not an object".
var selectedItem = listView.dataModel.data(listView.selectionList());
and this way,
CAN'T invoke: selectedItem.uniqueID
08-09-2013 08:19 AM
There is a difference between. What is the return type of data() method in both the epressions,check the return type.
08-09-2013 12:54 PM
Yeah, they doesn't return the same data.
Anyways, the way i got it to get the data items for a selected List for Context Menu is by putting a context menu property in the same container as standard list item, but the problem is:
it can't find the invokable functions defined in Qt and also, can't I push page to a navigationPane from context menu, becuase i get the similar below error (instead of _app, i have "navPane").
Returns "_app " symbol not defined. also, I can't call the parent listView (by its id).
why is context menu designed so weirdly?