PDA

View Full Version : problem with assigning the downloadloded image to label



addu
1st June 2009, 09:04
hi

i downloaded theimage from one Url ...while assigning the image to label ,at that time application is crashing ...here i have attached the code...

Note: i ma sending the Url string to image download from Widget.cpp..


Thanks


Addu T.R

kwisp
1st June 2009, 20:58
first of all, why do you connect signal(void sendimage(QImage)) and slot(void getimage(const QImage &image)) which have different parametrs QImage!=const QImage&.

Can you make test?


void Tweet::getimage(const QImage &image)
{
if(image.isNull()) return;
QPixmap pix(QPixmap::fromImage(image));
if(pix.isNull()) {
qDebug()<<"bad image";
return;
}
m_ui->userImage->setPixmap();
QMessageBox::information(0,"",QString("image got from download"));
}


second.


image = new QImage();

where are you return memory back?