PDA

View Full Version : For PNG file drawing....?



anafor2004
28th January 2009, 08:02
Hi All ,
I want to draw a png file to a QLabel with paintevent. Now I am using "drawPixmap(QPoint &,QPixmap &);" function. But I see that there is also "drawImage(QPoint &,QImage &);" . Which is the fastest way for drawing a .png Image?

Best Regards

wysota
28th January 2009, 08:05
1. Why not use QLabel::setPixmap() instead?
2. drawImage converts the image to a pixmap and then draws it. On Windows images and pixmaps are equivalent so the difference there is minimal, on other platforms drawImage() will be slower because of that conversion.