If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Regular Contributor
prathipa84
Posts: 55
Registered: ‎03-14-2012
My Device: RDJ21WW
My Carrier: none

Re: Loading the QML file

Hi

 

I have  posted a forum regard loading the QML file and attachjed the link below which I made conversion with the Native development team..Need immediate to solve this problem.

 

http://supportforums.blackberry.com/t5/Native-Development/Loading-the-QML-file/m-p/1796711

 

Thanks.

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Loading the QML file

If I understand correctly, you are trying to use Loader directly in QML.

The other thread shows how to do this in C++.

You can use classes documented here:

https://developer.blackberry.com/cascades/reference/classes.html

So the error actually is correct and is not misleading: it claims Loader is not a class because Loader is not a class.

 

Look at sample stampcollector.

Note the lines:

  QmlDocument *qml = QmlDocument::create().load("main.qml");

and

 QmlDocument *contentQml = QmlDocument::create().load("ContentPage.qml");

 

So this loads both pages separately in C++.   Use the objectName to find the pane (e.g. navigation pane) that you want to update with the new page.   Samples stampcollector shows how to do that.

 

Does this answer the question?  If so, please mark as solution.  If not, can you clarify exactly where you need help?

 

Stuart

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Loading the QML file

Please use plain text.