Hi! I'm newbie in Qt mobile! I have a problem when i load an image into a QPushButton. I loaded it! But the size of image is larger than the size of button! I want to reduce the size of image to fill the button! This is my code :
// Set image for button
QPixmap *image
= new QPixmap("C:\\Symbian\\Project\\Images\\mypic.png");
QSize iconSize
(image
->width
(), image
->height
());
ui->button->setIcon(icon);
ui->button->setIconSize(iconSize);
// Set image for button
QPixmap *image= new QPixmap("C:\\Symbian\\Project\\Images\\mypic.png");
QIcon icon(*image);
QSize iconSize(image->width(), image->height());
ui->button->setIcon(icon);
ui->button->setIconSize(iconSize);
To copy to clipboard, switch view to plain text mode
Help me ! Thanks a lot!
Bookmarks