[PyQt] Searching for a very small scprit using CLIPBOARD
Aron Bierbaum
aronbierbaum at gmail.com
Mon Apr 27 23:36:37 BST 2009
I have not tested on Linux, but it would not surprise me if it was not
supported in the same way.
-Aron
On Mon, Apr 27, 2009 at 5:22 PM, Giovanni Bajo <rasky at develer.com> wrote:
> On lun, 2009-04-27 at 18:42 +0200, projetmbc wrote:
>> Thanks a lot, your solution works fine. :-) Here is the complete
>> minimal code :
>>
>> ====================================
>> #!/usr/bin/env python
>> #coding=utf-8
>> import sys
>> from PyQt4 import QtGui, QtCore
>> app = QtGui.QApplication(sys.argv)
>> clipboard = app.clipboard()
>> clipboard.setText('The text that must be copied...')
>> event = QtCore.QEvent(QtCore.QEvent.Clipboard)
>> app.sendEvent(clipboard, event)
>> ====================================
>>
>
> It doesn't work for me on Linux. Should it?
> --
> Giovanni Bajo
> Develer S.r.l.
> http://www.develer.com
>
>
>
More information about the PyQt
mailing list