Google
 

10/12/09

QLabel

when set the qlabel pixmap, use the following:

 ui->label->setPixmap(QPixmap::fromImage(image));

QPixmap::fromImage is a static function.

The following codes do not seem to work:
QPixmap pixmap;
pixmap.fromImage(image);
ui->label->setPixmap(pixmap);

No comments: