[PyQt] QPixmap issue with pyqt 4.5.1

Phil Thompson phil at riverbankcomputing.com
Mon Jun 29 17:56:53 BST 2009

On Mon, 29 Jun 2009 08:48:12 -0600, Frank Schima <schimaf at boulder.nist.gov>
> 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.

Yes, there was a bug fix to ensure that the returned value was always


More information about the PyQt mailing list