Click here to Skip to main content
15,868,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i copy text to clipboard in pyqt6

i want to copy a text in line edit on clicking a button

What I have tried:

Python
cb = QApplication.clipboard()
        cb.clear(mode=cb.Clipboard())
        cb.setText(self.blogurl.text(), mode=cb.Clipboard()) 

i have tried this code but it is showing error :
AttributeError: 'QClipboard' object has no attribute 'Clipboard'
Posted
Updated 18-Oct-21 20:11pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900