[PyKDE] Help:Anybody give me an example how to use sip.voidptr object?

Phil Thompson phil at riverbankcomputing.co.uk
Wed Oct 1 10:59:01 BST 2003


On Wednesday 01 October 2003 8:16 am, Gerard Vermeulen wrote:
> On Tue, 30 Sep 2003 21:26:39 -0500
>
> sfang <sfang at bcm.tmc.edu> wrote:
> > Hello, Guys,
> > I got a sip.voidptr through qt.QImage.bits(), and I read doc that
> > sip.voidptr object is only useful if passed to another Python module. I
> > try to pass to other python module like  PIL to get those pixel data and
> > fail, Anyone has the experienc of use sip.voidptr? Could you tell me how
> > to use it or a piece code to show me how to use that kind of object, I am
> > realy need such a hint. I try a lot of way to understand how to use it.
> > Thank you very much!
> > Fang
>
> This is bound to fail: PIL does not know anything about qt.QImage.bits()

If PIL can accept a memory address then you would be able to use the result of 
int() applied to the result of bits().

Phil




More information about the PyQt mailing list