Hello:<br> I am having a little trouble with the QClipboard in linux. I seem to be able to read from the clipboard, but am unable to write to it. Using the code below, I get what is currently hilighted and print it out, then try to set the clipboard, but when I try to paste (using middle mouse button) nothing is pasted. We have QT4.3.2 and using an older build of 64 bit fedora. Anyone have any tips on how I can do a setText and middle mouse click in another program the text I set? Thanks<br>
<br>#!/usr/bin/python<br>import sys<br>import time<br>from PyQt4.QtCore import *<br>from PyQt4.QtGui import *<br><br>app = QApplication(sys.argv) <br>myClipBoard = QApplication.clipboard()<br>test = myClipBoard.text("plain",QClipboard.Selection)<br>
print "The clipboard has " + test<br>myClipBoard.setText("This is a test of my clipboard",QClipboard.Selection)<br>myClipBoard.setText("This is a test of my clipboard",QClipboard.Clipboard)<br>
test = myClipBoard.text("plain",QClipboard.Selection)<br>print "The clipboard has " + test<br><br>