arpspatel
1st March 2010, 21:44
void theGui::setImageLabel(QLabel* _label, IplImage* image){
_label->setPixmap(QPixmap::fromImage(Ipl2QImage(image)).sc aled(_label->size(),Qt::KeepAspectRatio));
}
This one works fine..
void theGui::setImageLabel(QLabel* _label, QString image){
_label->setPixmap(QPixmap(image).scaled(_label->size(),Qt::KeepAspectRatio));
}
This one doesnt work.. no image displayed
Can you please tell me why above one doesnt work, I tried various things like QPixmap::fromImage(QImage(image)) , but still doesnt work...
Thank you very much
Arpit
_label->setPixmap(QPixmap::fromImage(Ipl2QImage(image)).sc aled(_label->size(),Qt::KeepAspectRatio));
}
This one works fine..
void theGui::setImageLabel(QLabel* _label, QString image){
_label->setPixmap(QPixmap(image).scaled(_label->size(),Qt::KeepAspectRatio));
}
This one doesnt work.. no image displayed
Can you please tell me why above one doesnt work, I tried various things like QPixmap::fromImage(QImage(image)) , but still doesnt work...
Thank you very much
Arpit