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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
markwilcox
Posts: 51
Registered: ‎11-23-2012
My Carrier: GiffGaff

Re: Access a QVariant (of a custom class) in QML

Hooray!

 

I was getting the impression this was a C++ issue and not a C++/QML mixing issue.

 

In general you want to set all your pointers to NULL in the constructor as a matter of course, because you should be deleting them in the destructor and that could potentially get called before the secondary objects have all be constructed/initialized.  Good to learn the hard way though. :smileyhappy:

 

 

 

Please use plain text.
Developer
simon_hain
Posts: 13,817
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Access a QVariant (of a custom class) in QML

just to report that back, as we now discussed two pages in a resolved thread:
declaring the signal objects as QObject* is still neccessary for QML to access them, so the solution of this thread by Kyle is valid.
The other issues (discussed after the solution) all derived from passing invalid (not initialized) pointers to QML.
----------------------------------------------------------
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
Please use plain text.