<div>but you mentioned here </div><div><a href="http://pyqt.sourceforge.net/Docs/PyQt4/gotchas.html#support-for-void">http://pyqt.sourceforge.net/Docs/PyQt4/gotchas.html#support-for-void</a></div><div><br></div><div><span style="font-family: 宋体; font-size: 12px; line-height: 15px; text-align: justify;"> </span><span style="font-family: 宋体; font-size: 12px; line-height: 15px; text-align: justify;">A </span><tt class="docutils literal" style="background-color: rgb(236, 240, 243); padding: 0px 1px; font-size: 12px; line-height: 15px; text-align: justify;"><span class="pre">sip.voidptr</span></tt><span style="font-family: 宋体; font-size: 12px; line-height: 15px; text-align: justify;"> may also be given a size (ie. the size of the block of memory that is pointed to) by calling its </span><tt class="docutils literal" style="background-color: rgb(236, 240, 243); padding: 0px 1px; font-size: 12px; line-height: 15px; text-align: justify;"><span class="pre">setsize()</span></tt><span style="font-family: 宋体; font-size: 12px; line-height: 15px; text-align: justify;"> method. If it has a size then it is also able to support Python’s buffer protocol and behaves like a Python </span><tt class="docutils literal" style="background-color: rgb(236, 240, 243); padding: 0px 1px; font-size: 12px; line-height: 15px; text-align: justify;"><span class="pre">memoryview</span></tt><span style="font-family: 宋体; font-size: 12px; line-height: 15px; text-align: justify;"> object </span></div><div><span style="font-family: 宋体; font-size: 12px; line-height: 15px; text-align: justify;"><br></span></div><div><br></div><div style="text-align: justify;"><font face="宋体"><span style="font-size: 12.380952835083008px; line-height: 14.985119819641113px;">Is this mean </span></font><span style="font-family: 宋体; font-size: 12px; line-height: 15px;">A </span><tt class="docutils literal" style="background-color: rgb(236, 240, 243); padding: 0px 1px; font-size: 12px; line-height: 15px;"><span class="pre">sip.voidptr doesn't have </span></tt><span style="font-family: 宋体; font-size: 12.380952835083008px; line-height: 14.985119819641113px;">a size</span><span style="font-family: 宋体; font-size: 12.380952835083008px; line-height: 14.985119819641113px;"> by default ? if it is ,then </span><span style="background-color: rgb(236, 240, 243); font-family: monospace; font-size: 12.380952835083008px; line-height: 14.985119819641113px;">sip.voidptr couldn't support </span><span style="font-family: 宋体; font-size: 12.380952835083008px; line-height: 14.985119819641113px;"> </span><span style="font-family: 宋体; font-size: 12.380952835083008px; line-height: 14.985119819641113px;">Python’s buffer protocol,right ?</span></div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "phil";<phil@riverbankcomputing.com>;</div><div><b>发送时间:</b> 2014年1月10日(星期五) 晚上8:16</div><div><b>收件人:</b> "iMath"<2281570025@qq.com>; <wbr></div><div></div><div><b>主题:</b> Re: 回复: how to cast the returned pointer of QImage::scanLine(int i) toQRgb ? format is Format_RGB32</div></div><div><br></div>On 10-01-2014 12:04 pm, iMath wrote:<br>> ok.BTW, if it is possible ,I think functions returning pointer in Qt<br>> should return Python memoryview object in PyQt .<br><br>That would be an incompatible change. In any event the sip.voidptr <br>should be able to be used in place of a memoryview object as it supports <br>the buffer interface.<br><br>Phil<br>.<br></div>