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
Developer
Posts: 51
Registered: ‎11-23-2012
My Device: BB10 Dev Alpha
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:

 

 

 

Developer
Posts: 16,676
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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