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

Posts: 48
Registered: ‎08-07-2013
My Device: z10
My Carrier: blackberry

To get the array of points from cpp to qml



       please help me with a solution,i have an text file which contains points.i'm able to pare the text file and store them in an array which is a member of structure.now i have to use the array of structure in qml and get the points from it one after another,how can i do this

Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: To get the array of points from cpp to qml

qml does not support qlist directly, so you have several options:
-write a wrapper qobject class that offers q_invokable size/at methods
-use qdeclarativelistproperty
-use a qvariantlist (never tried that)
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter