mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
18f61c5f77
* move png, sjpg, bmp, gif, fs_if to extra/libs * reorganize the examples * update lv_conf_internal.h * fix warnings * add freetype * remove unused assets * add the new libs to build tests * update the docs
881 B
881 B
.. include:: /header.rst
:github_url: |github_link_base|/libs/qrcode.md
QR code
QR code generation with LVGL. Uses QR-Code-generator by nayuki.
Get started
- Download or clone this repository
- Download from GitHub
- Clone: git clone https://github.com/littlevgl/lv_lib_qrcode.git
- Include the library:
#include "lv_lib_qrcode/lv_qrcode.h"
- Test with the following code:
const char * data = "Hello world";
/*Create a 100x100 QR code*/
lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 100, lv_color_hex3(0x33f), lv_color_hex3(0xeef));
/*Set data*/
lv_qrcode_update(qr, data, strlen(data));
Notes
- QR codes with less data are smaller but they scaled by an integer numbers number to best fit to the given size