mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-29 08:21:27 +00:00
show message when copy button is pressed
This commit is contained in:
parent
01108d8b47
commit
252cb491c8
1 changed files with 5 additions and 2 deletions
|
@ -531,8 +531,11 @@ class ButtonsWidget(QWidget):
|
|||
|
||||
def addCopyButton(self, app):
|
||||
self.app = app
|
||||
f = lambda: self.app.clipboard().setText(str(self.text()))
|
||||
self.addButton(":icons/copy.png", f, _("Copy to clipboard"))
|
||||
self.addButton(":icons/copy.png", self.on_copy, _("Copy to clipboard"))
|
||||
|
||||
def on_copy(self):
|
||||
self.app.clipboard().setText(self.text())
|
||||
QToolTip.showText(QCursor.pos(), _("Text copied to clipboard"), self)
|
||||
|
||||
class ButtonsLineEdit(QLineEdit, ButtonsWidget):
|
||||
def __init__(self, text=None):
|
||||
|
|
Loading…
Add table
Reference in a new issue