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

New Developer
Posts: 7
Registered: ‎05-09-2013
My Device: Blackberry z10
My Carrier: mobilink

Can't modify qml component from c++

I am trying to modify the text of button using my c++ code but for some reason nothing happens.My complete code is pasted at this location http://stackoverflow.com/questions/16646572/cant-change-the-value-of-qml-component-from-c  .I am a newbie to BB development so anyone please help me.

Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Can't modify qml component from c++

This doesn't seem like Momentics-generated code. Why aren't you using QmlDocument class and createRootObject function?

This thread has an example:


Btw, I suspect that wizard-generated code is actually residing in Popop class

new Popop(&app);

 and you're creating a second QML instance in main() then working with that second instance which isn't used after that, so the changes aren't appearing.


Andrey Fidrya, @zmeyc on twitter