I have a simple PyQt4 application (see code below) that shows the following problem: if I select text from QLineEdit and copy it to the clipboard, then I can paste it into another application only while my application is running. It seems that upon exiting the PyQt application clears the clipboard, so I cannot paste the text after the application is closed.
What can I do to avoid this problem?
PyQt 4.4.3 @Python 2.5 @Windows XP. Also, this effect is confirmed on PyQt 4.5+, as well as on Linux.
import sys from PyQt4 import QtGui app = QtGui.QApplication(sys.argv) edit = QtGui.QLineEdit() edit.setText('foo bar') edit.show() app.exec_()
python clipboard qt4 pyqt pyqt4
bialix
source share