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
Developer
Posts: 324
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ
Accepted Solution

Get elements from DataModel w/o ListView (QML)

I have a DataModel object, that does not connected to ListView. It used to store data only, parsed from JSON.

 

How to generate indexPath variable (QList) in QML to get first object in list?

Developer
Posts: 324
Registered: ‎03-10-2010
My Device: Bold 9780, DevAlpha
My Carrier: Vodafone CZ

Re: Get elements from DataModel w/o ListView (QML)

Found solution by myself:

 

       var indexPath = new Array();
       indexPath[0]=0;
       var item = infoDataModel.data(indexPath);