Ah yes, that is my bad. I missed the part of the documentation for QClipboard where it says:<div><br>There is a single QClipboard object in an application, accessible as QApplication.clipboard().</div><div><br>Thanks for your time though :).</div>
<div><br></div><div>Chris<br>
<br><div class="gmail_quote">On Thu, Apr 29, 2010 at 11:31 AM, Russell Valentine <span dir="ltr"><<a href="mailto:russ@coldstonelabs.org">russ@coldstonelabs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Doesn't look like setText() is a static function, I'd suggest trying:<br>
<br>
QtGui.QApplication.clipboard().setText("This is a clipboard test.")<br>
<div><div></div><div class="h5"><br>
<br>
On 04/29/10 13:11, Chris Kaynor wrote:<br>
> When using PyQt 4.7 with Python 2.6.2, it is impossible to use the<br>
> QClipboard class.<br>
><br>
> When attempting to instantiate an instance of the class, the error<br>
> "TypeError: PyQt4.QtGui.QClipboard cannot be instantiated or sub-classed" is<br>
> raised.<br>
><br>
> As the class cannot be instantiated, I tried to call the methods on the type<br>
> object (QClipboard.setText) and got the error "TypeError:<br>
> QClipboard.setText(QString, QClipboard.Mode mode=QClipboard.Clipboard):<br>
> first argument of unbound method must have type 'QClipboard'"<br>
><br>
> Chris<br>
><br>
</div></div></blockquote></div><br></div>