[PyQt] 回复： 回复： how to cast the returned pointer of QImage::scanLine(int i) toQRgb ? format is Format_RGB32
2281570025 at qq.com
Sat Jan 11 02:42:52 GMT 2014
but you mentioned here
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 ?
------------------ 原始邮件 ------------------
发件人: "phil";<phil at riverbankcomputing.com>;
发送时间: 2014年1月10日(星期五) 晚上8:16
收件人: "iMath"<2281570025 at qq.com>;
主题: Re: 回复： how to cast the returned pointer of QImage::scanLine(int i) toQRgb ? format is Format_RGB32
On 10-01-2014 12:04 pm, iMath wrote:
> ok.BTW, if it is possible ,I think functions returning pointer in Qt
> should return Python memoryview object in PyQt .
That would be an incompatible change. In any event the sip.voidptr
should be able to be used in place of a memoryview object as it supports
the buffer interface.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt