[PyQt] Bug with QClipboard
ckaynor at zindagigames.com
Thu Apr 29 19:49:56 BST 2010
Ah yes, that is my bad. I missed the part of the documentation for
QClipboard where it says:
There is a single QClipboard object in an application, accessible
Thanks for your time though :).
On Thu, Apr 29, 2010 at 11:31 AM, Russell Valentine
<russ at coldstonelabs.org>wrote:
> Doesn't look like setText() is a static function, I'd suggest trying:
> QtGui.QApplication.clipboard().setText("This is a clipboard test.")
> On 04/29/10 13:11, Chris Kaynor wrote:
> > When using PyQt 4.7 with Python 2.6.2, it is impossible to use the
> > QClipboard class.
> > When attempting to instantiate an instance of the class, the error
> > "TypeError: PyQt4.QtGui.QClipboard cannot be instantiated or sub-classed"
> > raised.
> > As the class cannot be instantiated, I tried to call the methods on the
> > object (QClipboard.setText) and got the error "TypeError:
> > QClipboard.setText(QString, QClipboard.Mode mode=QClipboard.Clipboard):
> > first argument of unbound method must have type 'QClipboard'"
> > Chris
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt