--- a/src/lib/qrcodebarcode.cpp +++ b/src/lib/qrcodebarcode.cpp @@ -102,7 +102,7 @@ } const auto result = - QImage(img, code->width + 2 * margin, code->width + 2 * margin, QImage::Format_ARGB32).copy(); // deep copy as we are going to delete img + QImage(img, code->width + 2 * margin, code->width + 2 * margin, QImage::Format_RGBX8888).copy(); // deep copy as we are going to delete img delete[] img; return result; } --- a/src/lib/datamatrixbarcode.cpp +++ b/src/lib/datamatrixbarcode.cpp @@ -37,7 +37,7 @@ QImage ret; if (m_foreground == Qt::black && m_background == Qt::white) { - QImage tmp(enc->image->pxl, enc->image->width, enc->image->height, QImage::Format_ARGB32); + QImage tmp(enc->image->pxl, enc->image->width, enc->image->height, QImage::Format_RGBX8888); // we need to copy, because QImage generated from a char pointer requires the // char pointer to be kept around forever, and manually deleted. ret = tmp.copy();