Hello: 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
#!/usr/bin/python import sys import time from PyQt4.QtCore import * from PyQt4.QtGui import * app = QApplication(sys.argv) myClipBoard = QApplication.clipboard() test = myClipBoard.text("plain",QClipboard.Selection) print "The clipboard has " + test myClipBoard.setText("This is a test of my clipboard",QClipboard.Selection) myClipBoard.setText("This is a test of my clipboard",QClipboard.Clipboard) test = myClipBoard.text("plain",QClipboard.Selection) print "The clipboard has " + test
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt