What's the value of status? By the way, QPixmap has loadFromData() too, you don't have to go through QImage. Also, where do you free the buffer you pass to this method? How do you run this method?