James Grant wrote:
>
> Hi,
>
> Firstly, this piece of code in qclipboard.sip needs to change from:
> void setData(QMimeSource *);
> to this:
> void setData(QMimeSource * /Transfer/);
> Otherwise you get messages like this all the time from Qt:
> QMimeSource::~QMimeSource: clipboard data deleted!
> Because you're deleting the clipboard when you shouldn't be.
Thanks.
> Secondly, when you call the data() method of QClipboard you get a QMimeSource
> object returned. But the problem with this is that this class contains pure
> virtual methods in C++, such as encodedData(QString):
> QByteArray QMimeSource::encodedData ( const char * ) const [pure virtual]
>
> which means we end up with errors like this in python:
> dataStr = str(data.encodedData("application/x-blah"))
> AttributeError: encodedData
>
> My guess is that the data() method of QClipboard should be returning an object
> of the actual type, i.e. QStoredDrag.
I don't think QMimeSource provides the necessary type information to
"upcast" like that. I think the problem is that maybe SIP doesn't
properly support pure virtual methods.
Do you have a simple test script you can send me?
Phil
_______________________________________________
PyKDE mailing list [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde