[PyKDE] how to call sip.voidptr.asstring()

Phil Thompson phil at riverbankcomputing.co.uk
Thu Mar 18 20:41:01 GMT 2004


On Thursday 18 March 2004 14:54, Laurent Claustre wrote:
> I've just compiled/installed sip4.0rc3, PyQt 3.11 over Qt 3.2.0 with
> success, but don't know how
> to call the famous sip.voidptr.asstring() function.
> Is sip4 supporting this feature ?
>
>  >>> import qt, sip
>  >>> sip.voidptr.asstring()
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> AttributeError: 'module' object has no attribute 'voidptr'

img = QImage()

vptr = img.bits()

pystr = vptr.asstring(img.numBytes())

...or something like that.

Phil




More information about the PyQt mailing list