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: 44
Registered: ‎09-14-2012
My Device: BB 10 Dev alpha
My Carrier: -
Accepted Solution

Instantiate custom QML component from file

Hello!

 

If I have written custom QML component, let us say "MyComponent.qml". And I need to instantiate it in dynamically manner from C++, is it possible ?

 

Thanks

Highlighted
Contributor
Posts: 44
Registered: ‎09-14-2012
My Device: BB 10 Dev alpha
My Carrier: -

Re: Instantiate custom QML component from file

Also as root page instantiation:

 

...

qmlDoc = QmlDocument::create("MyComponent.qml");

Container* myComponent= qmlDoc->createRootNode<Container>(context);