[PyQt] QPixmap issue with pyqt 4.5.1

Frank Schima schimaf at boulder.nist.gov
Mon Jun 29 15:48:12 BST 2009

On Jun 26, 2009, at 10:52 AM, Frank Schima wrote:

> I'm seeing a strange issue with either QPixmap or QImage loading  
> from a data string. In pyqt 4.4.4, the following attached example  
> code produces an image - it looks like noise as expected. But with  
> pyqt 4.5.1, it appears completely blank. I expect to see the noise- 
> like image. Am I doing something wrong, or has something changed  
> with regards to this in 4.5?
> I'm running on Mac OS X 10.5.7 and python 2.5.4 using pyqt installed  
> from Macports. Note: I modified my local portfile to install pyqt  
> 4.5.1 because Macports is currently at version 4.4.4.

The problem turned out to be in my makeColorTable method. Specifically  
the qRgb() function returns a different value for me with pyqt 4.5.1  
and sip 4.8.1 than the value returned using 4.4.4/4.7.9. Should there  
be any difference between versions for that function?

For example, for qRgb(0,0,0) I get -16777216 with 4.4.4 and 4278190080  
with 4.5.1.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090629/ae9e72e4/attachment.html

More information about the PyQt mailing list