Aha; I think I see.
So if I have a QImage called 'fred', for example, I would use (following the example given in the Qt documentation for QImage::save):
QBuffer buffer
(&ba
);
// QBuffer inherits QIODevice fred.save(&buffer, "JPG")
buffer.close();
QByteArray ba;
QBuffer buffer(&ba); // QBuffer inherits QIODevice
buffer.open(QIODevice::WriteOnly);
fred.save(&buffer, "JPG")
buffer.close();
To copy to clipboard, switch view to plain text mode
Then if 'ds' is the data stream that the rest of my object's data is being written to, then:
ds << ba;
ds << ba;
To copy to clipboard, switch view to plain text mode
..should complete the process.
Looks good! Thank you very much.
Bookmarks