生成二维码必备,使用简单。直接保存成QPixmap。
struct zint_symbol* my_symbol = ZBarcode_Create();
my_symbol->symbology = BARCODE_QRCODE;
my_symbol->scale = 2;
my_symbol->show_hrt = 0;
ZBarcode_Encode_and_Buffer(my_symbol, (unsigned char *)m_keyString.toUtf8().data(), 0, 0);
QPixmap pixmap = Bitmap2Pixmap((unsigned char *)my_symbol->bitmap, my_symbol->bitmap_width, my_symbol->bitmap_height);
1