Dear All,
I am trying to display the images on the buttons.
I am able to display it.........But what I want is irrespective of the size(That is,less or of greater size than button parameters.)of the image, picture should fit exactly into the button size.

Images gets displayed upon buttons if greater or less than the button size but it won't get fit into the button parameters.
I have set the icon size to the button size using mainImage->setIconSize(QSize(100,160)); API.

But its not taking any effect.....
Need help on this.....

Below is the code I am using..
mainImage = new QPushButton(this);
mainImage->move(25,210);
mainImage->setIconSize(QSize(100,160));
mainImage->setGeometry(70,10,100,160);
mainImage->setFocusPolicy(Qt::TabFocus);
mainImage->show();

QString Imagename(*it5);
NextImagepath = "c:\\Data\\Images\\Pictures\\"+Imagename;
QPixmap imagedisplay(NextImagepath);
QIcon icon(imagedisplay);
mainImage->setIcon(icon);


I am using .jpg image of size 41KB.

Note:
I am using Qt-S60 temple release.

Thanks,
Prajna