how to attach a QImage in the mail through the SimpleMail?
xc233 opened this issue · comments
xc233 commented
When I add a image, I found it only can receive a QFile pointer. I have a QImage object now, how can I convert the QImage to QFile? I don't want to save the QImage to local disk because it's an async opeartion and then I need to delete the file. Thanks.
Daniel Nicoletti commented
Save the Image to a QBuffer and set it's pointer there
Daniel Nicoletti commented
Actually you can't set it's pointer as it expects a QFile, so you must get the bytearray from the QBuffer