you have the PNG image in RAM. but how is created?
if you have the image in a QByteArray you can use QPixmap::loadFromData().
bool isLoaded = pixmap.loadFromData ( byteArray, "PNG", Qt::AutoColor );
if ( !isLoaded )
// error
QPixmap pixmap;
bool isLoaded = pixmap.loadFromData ( byteArray, "PNG", Qt::AutoColor );
if ( !isLoaded )
// error
To copy to clipboard, switch view to plain text mode
The loader attempts to read the pixmap using the specified format. If the format is not specified (which is the default), the loader probes the file for a header to guess the file format.
Bookmarks