I've bundled some HTML and PNGs in my Qt app's resources file (for the help system). Unfortunately I can't find a way for the HTML to display images. I've tried various combinations of the QWebView
's base URL, and different URLs for the <img>
tag but none have worked so far.
To be clear, I want to be able to do something like this:
QString html = "<html><img href=':/resources/cat.png'/></html>";
myWebView->setHtml(html, ???);
Is this possible?
src
instead of it'shref
. – Doone