[PyQt] how to cast the returned pointer of QImage::scanLine(inti) to QRgb ? format is Format_RGB32

iMath 2281570025 at qq.com
Fri Jan 10 12:05:34 GMT 2014


but this is PyQt, many functions in Qt is not available in PyQt .




------------------ Original ------------------
From:  "zhang jian";<zhangmdev at gmail.com>;
Date:  Fri, Jan 10, 2014 05:48 PM
To:  "iMath"<2281570025 at qq.com>; 

Subject:  Re: [PyQt] how to cast the returned pointer of QImage::scanLine(inti) to QRgb ? format is Format_RGB32



This is from the qthread examples

 QImage image(resultSize, QImage::Format_RGB32);

uint *scanLine = reinterpret_cast<uint *>(image.scanLine(y));
*scanLine++ = qRgb(...);


 qRgb is equivalent to an unsigned int.                




On Fri, Jan 10, 2014 at 1:20 PM, iMath <2281570025 at qq.com> wrote:
 how to cast the returned pointer of 
uchar * QImage::scanLine(int i)
  to QRgb ? the image format is Format_RGB32

_______________________________________________
 PyQt mailing list    PyQt at riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140110/6bdf1020/attachment.html>


More information about the PyQt mailing list