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
New Contributor
Posts: 4
Registered: ‎06-19-2013
My Device: Z10
My Carrier: VF

Re: 10.2 qmlRegisterType

There's a bug raised for this issue here - https://www.blackberry.com/jira/browse/BBTEN-1353

 

Please vote for it!

Developer
Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: 10.2 qmlRegisterType

Just a point: The new 1.2 Momentics is not using the embeded JRE, but the system JRE. It seems it reverses the resolution order of the JRE, pointing mine to JRE 1.4 (which is needed for BB Java and last in the normal resolution order in my "path")

 

In fact this line, in the file "qde.ini" is indeed adding this JRE to the list of available JRE to Momentics, but not as the first one.

-vm
features/com.qnx.tools.jre.win32_1.6.0.43/jre/bin

 

 

BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: 10.2 qmlRegisterType

Do you have forum post about deploy issues? I don't want to comment on this one for unrelated issue

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: 10.2 qmlRegisterType

If you add Q_DECL_EXPORT to your Class (class Q_DECL_EXPORT SomeControl) it gets rid of the errors. Instead you'll see a lightbulb saying its unkown or a custom control.

 

What I don't understand is that I have the BarcodeDecoder copied into the project from the barcode sample, which uses the "bb.community.barcode" library name, and it doesn't have any errors. My custom one however shows errors and says my library is unknown. Both a registered. As far as I can tell the only difference is that I don't use a namespace for the classes, and the library name is a single name with no '.' ... Even when trying to use a namespace and different library name, it still had issues when BarcodeDecoder doesn't.

Developer
Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: 10.2 qmlRegisterType

About the deploy and JRE issue, I have just created a JIRA: https://www.blackberry.com/jira/browse/BBTEN-1354

Sorry to mix the two problems in one post

 

Developer
Posts: 410
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: 10.2 qmlRegisterType

Thanks mreed!

That's worked for me

New Contributor
Posts: 4
Registered: ‎06-19-2013
My Device: Z10
My Carrier: VF

Re: 10.2 qmlRegisterType


mreed wrote:

If you add Q_DECL_EXPORT to your Class (class Q_DECL_EXPORT SomeControl) it gets rid of the errors. Instead you'll see a lightbulb saying its unkown or a custom control.

 

What I don't understand is that I have the BarcodeDecoder copied into the project from the barcode sample, which uses the "bb.community.barcode" library name, and it doesn't have any errors. My custom one however shows errors and says my library is unknown. Both a registered. As far as I can tell the only difference is that I don't use a namespace for the classes, and the library name is a single name with no '.' ... Even when trying to use a namespace and different library name, it still had issues when BarcodeDecoder doesn't.


This won't work for me as my custom control is declared in Qml.

Developer
Posts: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Re: 10.2 qmlRegisterType

[ Edited ]
If you add Q_DECL_EXPORT to your Class (class Q_DECL_EXPORT SomeControl) it gets rid of the errors. Instead you'll see a lightbulb saying its unkown or a custom control.
 
What I don't understand is that I have the BarcodeDecoder copied into the project from the barcode sample, which uses the "bb.community.barcode" library name, and it doesn't have any errors. My custom one however shows errors and says my library is unknown. Both a registered. As far as I can tell the only difference is that I don't use a namespace for the classes, and the library name is a single name with no '.' ... Even when trying to use a namespace and different library name, it still had issues when BarcodeDecoder doesn't.

 

 

This worked for me, however QML autocompletion no longer works inside the components I've marked with Q_DECL_EXPORT. From one inconvenience to another, it seems.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!