Seema Rao
8th February 2006, 10:56
Hi all,
I am using Qt version 4.0.1. I am trying to add a Image on QPushButton
So here is the program I have written,
#include <QtGui>
#include <QPushButton>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton *button = new QPushButton ("Rock and Roll");
button->setPixmap(QPixmap(" Door.bmp"));
button->show();
return a.exec();
}
But it gives compilation "error no matching function for call to `QPushButton::setPixmap(QPixmap)'"
Can some body explain how to do it? Same lines are explained in Qt 4.01.
but I dont know why its not compiling?
Thanks in Advance,
Seema Rao
I am using Qt version 4.0.1. I am trying to add a Image on QPushButton
So here is the program I have written,
#include <QtGui>
#include <QPushButton>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton *button = new QPushButton ("Rock and Roll");
button->setPixmap(QPixmap(" Door.bmp"));
button->show();
return a.exec();
}
But it gives compilation "error no matching function for call to `QPushButton::setPixmap(QPixmap)'"
Can some body explain how to do it? Same lines are explained in Qt 4.01.
but I dont know why its not compiling?
Thanks in Advance,
Seema Rao