[PyQt] 回复: 回复: how to cast the returned pointer of QImage::scanLine(int i) toQRgb ? format is Format_RGB32
iMath
2281570025 at qq.com
Sat Jan 11 02:42:52 GMT 2014
but you mentioned here
http://pyqt.sourceforge.net/Docs/PyQt4/gotchas.html#support-for-void
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.
Phil
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140111/4ea023fb/attachment.html>
More information about the PyQt
mailing list