#include "mainwindow.h"
#include <QtGui/QApplication>
#include<QPushButton>
#include<QIcon>
int main(int argc, char *argv[])
{
button
->setIcon
(QIcon("favicon.Icon"));
button->show();
return app.exec();
}
#include "mainwindow.h"
#include <QtGui/QApplication>
#include<QPushButton>
#include<QIcon>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton *button = new QPushButton ();
button->setIcon(QIcon("favicon.Icon"));
button->show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Hi all i am new to qt and i am trying to add images to Qpushbutton but i was not to get the image displayed in the button?I dont know where i go wrong can anyone help me with this ?
Here is the code which i have tried.
Regards,
Harish
Bookmarks