Skip to content

Instantly share code, notes, and snippets.

@fecub
Created January 5, 2015 13:35
Show Gist options
  • Save fecub/8caaaacfcf6d36384b05 to your computer and use it in GitHub Desktop.
Save fecub/8caaaacfcf6d36384b05 to your computer and use it in GitHub Desktop.
Write QByteArray to file or image file
QByteArray imageByteArray = blayer->TableContentRTM("Produkte")->record(pIndex.row()).value("Image").toByteArray();
QFile newDoc("/home/fecub/fileName.png");
if(newDoc.open(QIODevice::WriteOnly)){
newDoc.write(imageByteArray);
}
newDoc.close();
@MUZLATAN
Copy link

thanks for your code. I solve my questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment