Qt 5 wrapper and renderer for qrencode (QR Code encoding) library.
You will need Qt 5+ and qrencode 3.4+. Clone this repo and build it with Qt's qmake:
sudo apt-get install libqrencode-dev
git clone https://github.com/yoneal/qtqrencode
cd qtqrencode
mkdir build && cd build
qmake -Wall ../qtqrencode.pro
make
# You can install it, if you want..
sudo make install
Or, you can just open the project using Qt Creator.
Just grab the library, along with the following header files:
- qqrencode.h
- libqtqrencode_global.h
Then include it in your project like so,
LIBS += -lqtqrencode
No need to manually copy the files if you installed it in the system directories..
#include <qqrencode.h>
...
QQREncode encoder;
encoder.encode(QString("abcdefghijklmnopqrstuvwxyz 1234567890$%*+-./:");
QImage qrcode = encoder.toQImage();
qrcode.scaled(150,150).save("qrcode.jpg","JPG");
See test folder for more examples.
Thanks to Kentaro Fukuchi for sharing qrencode.