1
0

qt: allow QR codes to store a bit more data

by decreasing error correction (about ~26% larger max payload)
This commit is contained in:
SomberNight
2019-05-26 02:13:02 +02:00
parent aec53ae6af
commit c776af41f6
2 changed files with 10 additions and 2 deletions

View File

@@ -27,7 +27,11 @@ class QRCodeWidget(QWidget):
if self.data != data:
self.data = data
if self.data:
self.qr = qrcode.QRCode()
self.qr = qrcode.QRCode(
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=0,
)
self.qr.add_data(self.data)
if not self.fixedSize:
k = len(self.qr.get_matrix())