From QImage

QT

Convert from QImage to QPixmap

QString filename = "test.png"; QImage image(filename); QPixmap pixmap = QPixmap::fromImage(image);