QR code fixes
New classes ScanQRTextEdit and ShowQRTextEdit. Reason: dependencies on zbar availability and issues with the QRTextEdit constructor. - ScanQRTextEdit needs access to the config (fetch camera). It needs to load the zbar processor properly before trying to scan. Keeping a reference to the processor in qrscaner fixes the crashes on windows. - ShowQRTextEdit should not have access to scan_qr(). - no need to setReadOnly anymore. It is clear from the class name. Show master pub keys now has a Combobox if multiple accounts are available.
This commit is contained in:
@@ -137,7 +137,7 @@ def line_dialog(parent, title, label, ok_label, default=None):
|
||||
return unicode(txt.text())
|
||||
|
||||
def text_dialog(parent, title, label, ok_label, default=None):
|
||||
from qrtextedit import QRTextEdit
|
||||
from qrtextedit import ScanQRTextEdit
|
||||
dialog = QDialog(parent)
|
||||
dialog.setMinimumWidth(500)
|
||||
dialog.setWindowTitle(title)
|
||||
@@ -145,7 +145,7 @@ def text_dialog(parent, title, label, ok_label, default=None):
|
||||
l = QVBoxLayout()
|
||||
dialog.setLayout(l)
|
||||
l.addWidget(QLabel(label))
|
||||
txt = QRTextEdit()
|
||||
txt = ScanQRTextEdit(parent)
|
||||
if default:
|
||||
txt.setText(default)
|
||||
l.addWidget(txt)
|
||||
|
||||
Reference in New Issue
Block a user