Hi all,
How to scale an image to a label's size and display it on the label. I tried to
do this, but even though I have scaled the pixel values of image to label size,
it is displayed partially on the label. Here is the code I have written
QLabel *mylabel = new MyLabel(mywid,"myfirstlabel");
mylabel->setGeometry(0,6,100,100);
QPixmap mypix;
mypix.load ("query.png");
mypix.scaledToWidth(100,Qt::FastTransformation);
mypix.scaledToHeight(100,Qt::FastTransformation);
mylabel->setPixmap(mypix);
mylabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
Can some body explain how to do it?
Thanks in Advance,
Seema
Bookmarks