In the constructor of my project's class say myclass.cpp
i wrote the following code:
#include "myclass.h"
#include "ui_myclass.h"
MyClass::MyClass(QWidget *parent) :
QDialog(parent),
ui(new Ui::MyClass)
{
ui->setupUi(this);
QString imagePath="xyz1.jpeg";
QImage logo(imagePath);
}
The image doesn't get loade on the form as specified by QImage class documentation of QT SDK 4.6.2....
Whats wrong??? Can anyone please guide???
I even tried this.....
#include "myclass.h"
#include "ui_myclass.h"
MyClass::MyClass(QWidget *parent) :
QDialog(parent),
ui(new Ui::MyClass)
{
ui->setupUi(this);
QString imagePath="xyz1.jpeg";
QImage logo;
logo.load(imagePath);
}
Do i have to add anything else to set the image on the form???
Bookmarks