NicholasSmith
25th August 2009, 18:38
Hi guys, this may have been answered before but I've had a search and turned nothing up.
What I'm trying to do is add a header to a QTextDocument containing images, however there's going to be multiple documents each with different logos and those logos can and generally will change at a moments notice. What I've been trying to do is:
QImage img("http://some.org/images/image.png");
document_header->addResource(QTextDocument::ImageResource, QUrl("http://some.org/images/image.png"), img );
QString company_header = "<img src=':http://some.org/images/image.png'>";
Which just a) seems wrong to me anyway, and b) inserts a placeholder image anyway.
I've had a look through the usual QImage class methods and QUrl but I've not spotted anything relevant, anyone else got any ideas? I'd prefer to not be keeping them as local files, as it'll be a pain to push them out when the files get changed.
What I'm trying to do is add a header to a QTextDocument containing images, however there's going to be multiple documents each with different logos and those logos can and generally will change at a moments notice. What I've been trying to do is:
QImage img("http://some.org/images/image.png");
document_header->addResource(QTextDocument::ImageResource, QUrl("http://some.org/images/image.png"), img );
QString company_header = "<img src=':http://some.org/images/image.png'>";
Which just a) seems wrong to me anyway, and b) inserts a placeholder image anyway.
I've had a look through the usual QImage class methods and QUrl but I've not spotted anything relevant, anyone else got any ideas? I'd prefer to not be keeping them as local files, as it'll be a pain to push them out when the files get changed.