thnx for reply..
i tried setmask(),but still after using this,i got a black boundary of pushbutton ,when i pressed the qpushbutton....
i write the following code:
{
QPixmap image
(":/images/but_00.png");
button_close->setGeometry(100,100,image.width(),image.height());
button_close->setFlat(1);
QSize size
(image.
width(),image.
height());
button_close->setIconSize ( size );
button_close->setIcon(image);
button_close->setMask(image.mask());
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
QPushButton *button_close=new QPushButton(this);
QPixmap image(":/images/but_00.png");
button_close->setGeometry(100,100,image.width(),image.height());
button_close->setFlat(1);
QSize size(image.width(),image.height());
button_close->setIconSize ( size );
button_close->setIcon(image);
button_close->setMask(image.mask());
}
To copy to clipboard, switch view to plain text mode
Is something wrong in code??
or Is there any other way to do this??
plzz specify..
Bookmarks