Drawing QR code with Qt in native C/C++
问题 I am successfully drawing and displaying the QrCode on a QLabel , but it's not recognised when I scan it. Here is the code I used - I made a small class with a static function: void QrCodeDrawer::paintQR(QPainter &painter, const QSize sz, const QString &data, QColor fg) { char *str=data.toUtf8().data(); // NOTE: At this point you will use the API to get the encoding and format you want, instead of my hardcoded stuff: QrCode qr = QrCode::encodeText(str, QrCode::Ecc::HIGH); const int s=qr.size