Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Contributor
Posts: 48
Registered: ‎11-03-2011
My Device: Playbook
My Carrier: None
Accepted Solution

Listview selected item Issue from a sheet.

Hi,

 

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?

 

Thx. 

Contributor
Posts: 48
Registered: ‎11-03-2011
My Device: Playbook
My Carrier: None

Re: Listview selected item Issue from a sheet.

**bleep** wrong forum, I have no idea why I did that!

 

Im opening a new post in cascades forum and will set this to resolved.

Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Listview selected item Issue from a sheet.

(Note: you can move threads using the Options top right of the message)