Hi all,
I have a problem, I am trying to display Icon on a Tool button. Icon size should cover
the tool button fully, but it covers partially. Here is the code I have written, I have
used setIconSize() to set the size,
#include <QtGui>
#include <QToolButton>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QWidget *mywidget= new QWidget;
QToolButton *button = new QToolButton (mywidget);
button->setIcon(QPixmap("Door.bmp"));
button->setIconSize(QSize(button->width(), button->height()));
mywidget->show();
return a.exec();
}
Thanks in advance,
Seema Rao
Bookmarks