QPixmap pixmap; QByteArray loadimage; loadimage=query.value(16).toByteArray(); pixmap.loadFromData(loadimage); photolabel->setPixmap(pixmap);
if (!photolabel->pixmap()->isNull()) { const QPixmap *pixmap=photolabel->pixmap(); QBuffer buffer(&bytes); buffer.open(QIODevice::WriteOnly); pixmap->save(&buffer, "PNG"); }query.bindValue(":photo", bytes);
QString fileName; QByteArray bytes;