08-23-2012 10:11 AM
In my main.qml I have a listview using the standardlistitem.
I have a context menu attached to the standardlistitems.
Now at first I had an issue selecting a list item when I invoked one of the options in the context menu from the item. The item does not get selected when you bring up the menu.
To resolve this I use the onTriggered signal within the context menu to call select on the listview. This invokes the onSelectionChanged signal of the listView itself.
Here is my issue now:
If I invoke a c++ function from this onSelectionChanged signal of the main.qml and in that c++ function I call the selected() funtion on the listview to get the indexPath the function works properly and the index is returned.
But if I first make a sheet visible and call the c++ function from within the sheet the call to selected() returns nothing.
There is nothing in my qml or cpp that clears the selection, does this happen by default or something when the sheet is opened?
Solved! Go to Solution.