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;
if(pix.isNull()) {
qDebug()<<"bad image";
return;
}
m_ui->userImage->setPixmap();
}
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"));
}
To copy to clipboard, switch view to plain text mode
second.
image = new QImage();
To copy to clipboard, switch view to plain text mode
where are you return memory back?
Bookmarks