[PyQt] 回复: 回复: how to cast the returned pointer of QImage::scanLine(int i) toQRgb ? format is Format_RGB32

Phil Thompson phil at riverbankcomputing.com
Sat Jan 11 09:30:59 GMT 2014


On 11-01-2014 2:42 am, iMath wrote:
> but you mentioned here
> http://pyqt.sourceforge.net/Docs/PyQt4/gotchas.html#support-for-void
> [1]
>
>  A sip.voidptr may also be given a size (ie. the size of the block of
> memory that is pointed to) by calling its setsize() method. If it has
> a size then it is also able to support Python’s buffer protocol and
> behaves like a Python memoryview object
>
> Is this mean A sip.voidptr doesn't have a size by default ? if it is
> ,then sip.voidptr couldn't support Python’s buffer protocol,right ?

It will support a size if it is available. I will look at this 
particular case to see if the size can be determined.

Phil


More information about the PyQt mailing list