1
0

use ctypes to access the zbar library

This commit is contained in:
ThomasV
2017-02-17 20:56:38 +01:00
parent 90464b6ac1
commit d99855f060
4 changed files with 49 additions and 39 deletions

View File

@@ -49,12 +49,12 @@ class ScanQRTextEdit(ButtonsTextEdit, MessageBoxMixin):
def qr_input(self):
from electrum import qrscanner, get_config
try:
data = qrscanner.scan_qr(get_config())
data = qrscanner.scan_barcode(get_config().get_video_device())
except BaseException as e:
self.show_error(str(e))
return ""
data = ''
if type(data) != str:
return
data = ''
self.setText(data)
return data