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
jameztcc
Posts: 47
Registered: ‎11-11-2012
My Carrier: Digi
Accepted Solution

Encode / generate QRCode/barcode

Hi,

 

any starting point how I could encode/generate a qrcode as an image to display in QML?

 

thanks!



James Tan
Eating my dog food - TripLogger, my 1st bb10 app.
Please use plain text.
Developer
zezke
Posts: 835
Registered: ‎12-12-2010
My Carrier: Mobile Vikings

Re: Encode / generate QRCode/barcode

There must be some C++ libraries out there, alas I don't know them. The other option is to use an online API (like https://www.mashape.com/cingusoft/barcode-generator-2-0 etc).
-------------------------------------------
Your like is much appreciated!
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
Developer
Curahee
Posts: 122
Registered: ‎01-12-2013
My Carrier: -

Re: Encode / generate QRCode/barcode

You can have a look at Zxing. They have developed a QR generator/decoder for Java but they also created a partial C++ port. Maybe it helps you a little.

 

http://code.google.com/p/zxing/

______________________________________________________
Voetbal afgelast in België? Check at AppWorld
Please use plain text.
Contributor
nhuanvd
Posts: 12
Registered: ‎12-11-2012
My Carrier: Viettel

Re: Encode / generate QRCode/barcode

Have you solved your problem? This is a easy way to show QrCode.

 

QrCodeView {
	id: qrCode
	data: "Your Data Here"
	preferredWidth: 300
	preferredHeight: 300
	horizontalAlignment: HorizontalAlignment.Center
}   

 You need to import

import bb.cascades.multimedia 1.0
import bb.multimedia 1.0

 and add the following line to your .pro file:

LIBS += -lbbcascadesmultimedia

 http://developer.blackberry.com/cascades/reference/bb__cascades__multimedia__qrcodeview.html

 

Please use plain text.
Developer
jameztcc
Posts: 47
Registered: ‎11-11-2012
My Carrier: Digi

Re: Encode / generate QRCode/barcode

I've tried using c++ libraries but am not skilled enough to take it off.

Used the online API approach e.g. http://api.qrserver.com and it works though webview is unpredictable at times.

The official QrCodeView works without network connectivity and suits my purpose.

Thanks everyone for the ideas!


James Tan
Eating my dog food - TripLogger, my 1st bb10 app.
Please use plain text.