Files
luban-lite-t3e-pro/packages/third-party/lvgl/lvgl-8.3.2/docs/libs/qrcode.md
刘可亮 7bbc029dae v1.0.0
2023-08-30 16:21:18 +08:00

924 B

QR code

QR code generation with LVGL. Uses QR-Code-generator by nayuki.

Get started

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 number to best fit to the given size.

Example


.. include:: ../../examples/libs/qrcode/index.rst

API


.. doxygenfile:: lv_qrcode.h
  :project: lvgl