qrtextedi: minor fixes
This commit is contained in:
@@ -5,7 +5,7 @@ from PyQt4.QtCore import *
|
|||||||
class QRTextEdit(QPlainTextEdit):
|
class QRTextEdit(QPlainTextEdit):
|
||||||
|
|
||||||
def __init__(self, text=None):
|
def __init__(self, text=None):
|
||||||
QTextEdit.__init__(self, text)
|
QPlainTextEdit.__init__(self, text)
|
||||||
self.button = QToolButton(self)
|
self.button = QToolButton(self)
|
||||||
self.button.setIcon(QIcon(":icons/qrcode.png"))
|
self.button.setIcon(QIcon(":icons/qrcode.png"))
|
||||||
self.button.setStyleSheet("QToolButton { border: none; padding: 0px; }")
|
self.button.setStyleSheet("QToolButton { border: none; padding: 0px; }")
|
||||||
@@ -32,9 +32,9 @@ class QRTextEdit(QPlainTextEdit):
|
|||||||
def qr_show(self):
|
def qr_show(self):
|
||||||
from qrcodewidget import QRDialog
|
from qrcodewidget import QRDialog
|
||||||
try:
|
try:
|
||||||
s = unicode(self.toPlainText())
|
|
||||||
except:
|
|
||||||
s = str(self.toPlainText())
|
s = str(self.toPlainText())
|
||||||
|
except:
|
||||||
|
s = unicode(self.toPlainText())
|
||||||
QRDialog(s).exec_()
|
QRDialog(s).exec_()
|
||||||
|
|
||||||
def qr_input(self):
|
def qr_input(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user