PDA

View Full Version : How to load image without using QGraphicsView?



chong_kimkeang
10th October 2012, 05:02
I want to load an image that is not the background image without using QGraphicsView. How can I do with this?

sonulohani
10th October 2012, 05:24
use QLabel and set the pixmap like this:-



QLabel *label = new QLabel(this);
QPixmap pix;
pix.load(const QString & fileName, const char * format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
label->setPixmap (pix);

chong_kimkeang
10th October 2012, 08:29
Thanks ,I found it already.