[PyKDE] QGLWidget rendering problems

David Boddie david at boddie.org.uk
Thu Dec 18 21:53:01 GMT 2003


On Thursday 18 December 2003 18:29, Phil Thompson wrote:

> On Thursday 18 December 2003 12:36 am, David Boddie wrote:

> > Getting this sort of information from a QImage object at the Python level
> > appears to be difficult since there isn't an equivalent to the
> > QImage.loadFromData method for saving image data. Wasn't this problem
> > discussed on this list recently?
>
> I'm quite willing to add a toString() method to the sip.voidptr type which
> will take an argument specifying the number of bytes. I'm less willing to
> add anything more complicated.

It's an interesting solution, but I'm (slightly more) interested in symmetry
between the functions which return uchar* and those which take uchar* as an
argument. For example, the QImage.loadFromData method can take a string as an
argument so you might expect QImage.bits to automatically return a string.

This is obviously going to be more work. Your solution is probably just as
convenient, and more generally useful.

David




More information about the PyQt mailing list