Page MenuHomePhabricator

[electrum] add a copy_to_clipboard util function
ClosedPublic

Authored by PiRK on Jul 9 2025, 09:12.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC9d5a6f042e4d: [electrum] add a copy_to_clipboard util function
Summary

This has three benefits:

  • factor some boilerplate code
  • reduce the dependency on self.main_window in the address tab
  • remove a QtWidgets.app reference that does not work with python6
Test Plan

Go the the address tab, right click on an address and try the 2 copy actions. Test this also with the env var QT_API=pyqt6
Open a transaction dialog (right click on a tx in the history and click Details), select some text in the input widget, right click and "Copy Selected Text"

Event Timeline

PiRK requested review of this revision.Jul 9 2025, 09:12
Fabien added a subscriber: Fabien.
Fabien added inline comments.
electrum/electrumabc_gui/qt/transaction_dialog.py
1014 ↗(On Diff #54759)

Please make it consistent with or without the named parameters

This revision is now accepted and ready to land.Jul 9 2025, 14:16

consistency: used named params only when the text argument is omitted. When we copy selected text from a QTextEdit we don't want to pass a confusing text="" param