PDA

View Full Version : QPixmap Issue with 4.8



IanC
11th February 2012, 08:01
I've had an app running for a while using Qt 4.7.0 that I just upgraded to 4.8.0 and I've run into an issue that it looks like is in QPixmap.LoadFromData().

WinXP 32Bit Qt
I'm grabbing JPEG frames over a UDP socket and putting them into a QPixmap using LoadFromData, finally assigning the pixmap to a label to display on a screen. With 4.7.0 it was running a little sluggish and using up about 50% of the CPU.

I just upgraded to 4.8 and using the same code it appears that after the first image the CPU jumps up to 99% and I end up having to terminate the application using TaskManager.

I commented out the QPixmap and label code and the app runs fine grabbing the images over the network with the CPU at about 10 %. As soon as I put the one line QPixmap.LoadFromData() it's all over. Has anyone seen this issue before?

Also are there any more efficient ways of doing what I'm attempting to do rather than using QPixmap and QLabel, I used the ImageViewer example as my baseline?

Thanks
Ian

ChrisW67
11th February 2012, 08:20
How are you collecting the data? Are you certain it is a complete image? Have you compared the original image to the data you have received? Can you load the original image from a file?