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
Contributor
Posts: 14
Registered: ‎11-19-2012
My Device: 9900, BB10 Simulator
My Carrier: Rogers

A QML page with dynamically added components?

Can a QML page have variable number of components in it?

For example can it call a method in C++ (let's say: _app.getNumberOfButtons())  to find out how many buttons it should put in the page?

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: A QML page with dynamically added components?

yes, you can dynamically create qml elements, for example by using createObject().
See
https://developer.blackberry.com/cascades/documentation/dev/dynamic_qml/index.html
----------------------------------------------------------
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