Merge pull request #9778 from accumulator/qt_richlabel
plugins: coldcard: use RichLabel, org imports
This commit is contained in:
@@ -105,12 +105,21 @@ class ThreadedButton(QPushButton):
|
||||
|
||||
|
||||
class WWLabel(QLabel):
|
||||
def __init__ (self, text="", parent=None):
|
||||
"""Word-wrapping label"""
|
||||
def __init__(self, text="", parent=None):
|
||||
QLabel.__init__(self, text, parent)
|
||||
self.setWordWrap(True)
|
||||
self.setTextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse)
|
||||
|
||||
|
||||
class RichLabel(WWLabel):
|
||||
"""Word-wrapping label with link activation"""
|
||||
def __init__(self, text='', parent=None):
|
||||
WWLabel.__init__(self, text, parent)
|
||||
self.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction)
|
||||
self.setOpenExternalLinks(True)
|
||||
|
||||
|
||||
class AmountLabel(QLabel):
|
||||
def __init__(self, *args, **kwargs):
|
||||
QLabel.__init__(self, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user