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">&lt;<a href="mailto:russ@coldstonelabs.org">russ@coldstonelabs.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Doesn&#39;t look like setText() is a static function, I&#39;d suggest trying:<br>
<br>
QtGui.QApplication.clipboard().setText(&quot;This is a clipboard test.&quot;)<br>
<div><div></div><div class="h5"><br>
<br>
On 04/29/10 13:11, Chris Kaynor wrote:<br>
&gt; When using PyQt 4.7 with Python 2.6.2, it is impossible to use the<br>
&gt; QClipboard class.<br>
&gt;<br>
&gt; When attempting to instantiate an instance of the class, the error<br>
&gt; &quot;TypeError: PyQt4.QtGui.QClipboard cannot be instantiated or sub-classed&quot; is<br>
&gt; raised.<br>
&gt;<br>
&gt; As the class cannot be instantiated, I tried to call the methods on the type<br>
&gt; object (QClipboard.setText) and got the error &quot;TypeError:<br>
&gt; QClipboard.setText(QString, QClipboard.Mode mode=QClipboard.Clipboard):<br>
&gt; first argument of unbound method must have type &#39;QClipboard&#39;&quot;<br>
&gt;<br>
&gt; Chris<br>
&gt;<br>
</div></div></blockquote></div><br></div>