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: 23
Registered: ‎01-01-2013
My Device: BlackBerry Dev Alpha B
My Carrier: airtel

Unknown symbol warning in qml file for C++ objects

Hi,

 

I am having following code in C++ file to expose object to qml

 

QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
qml->setContextProperty("_myClass", new MyClass(this));

 

when I am using the _myClass in qml file I see a i in editor with warning 'unknown symbol'

 

though the code works fine, but how to fix this warning in editor ?

 

Thanks for your support,

lauvot

 

Developer
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 LE
My Carrier: Three

Re: Unknown symbol warning in qml file for C++ objects

No way of fixing it as far as I'm aware. The QML editor can't take external libraries into account at the moment. Your best bet is to just ignore it.



Did this post help you? If so, please make sure to "like" it!
Highlighted
Contributor
Posts: 23
Registered: ‎01-01-2013
My Device: BlackBerry Dev Alpha B
My Carrier: airtel

Re: Unknown symbol warning in qml file for C++ objects

Thanks a lot !!

Developer
Posts: 285
Registered: ‎08-06-2010
My Device: Z10

Re: Unknown symbol warning in qml file for C++ objects

In 10.1, I believe you can whitelist these symbols individually.



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Regular Contributor
Posts: 77
Registered: ‎11-03-2009
My Device: 9810 Torch
My Carrier: VIPnet

Re: Unknown symbol warning in qml file for C++ objects

You can whitelist, but QML Editor keeps crashing.  At least that is what I'm experiencing