File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 11from PySide6 .QtCore import Slot , QObject
2- from PySide6 .QtGui import QClipboard
2+ from PySide6 .QtGui import QGuiApplication
33
44
55class ClipboardHelper (QObject ):
@@ -9,14 +9,7 @@ class ClipboardHelper(QObject):
99
1010 def __init__ (self , parent = None ):
1111 super (ClipboardHelper , self ).__init__ (parent )
12- self ._clipboard = QClipboard (parent = self )
13-
14- def __del__ (self ):
15- # Workaround to avoid the "QXcbClipboard: Unable to receive an event from the clipboard manager
16- # in a reasonable time" that will hold up the application when exiting if the clipboard has been
17- # used at least once and its content exceeds a certain size (on X11/XCB).
18- # The bug occurs in QClipboard and is present on all Qt5 versions.
19- self .clear ()
12+ self ._clipboard = QGuiApplication .clipboard ()
2013
2114 @Slot (str )
2215 def setText (self , value ):
You can’t perform that action at this time.
0 commit comments