The problem is security restrictions within WebKit.
AFAIK the idea behind that is to prevent HTML pages from the internet to include/reference files on the hard disk, and for some reason a call too setHtml()
makes WebKit think that the HTML must not be allowed to access files on the disk (using the file://
schema).
I think I worked around this by letting WebKit know that the set HTML indeed comes from the hard disk itself and should be allowed to access local files respectively.
void QWebView::setHtml ( const QString & html, const QUrl & baseUrl = QUrl() )
Can't test it here and now, but you could try to give baseUrl something like file://abcd
.
Also, lack of PNG support might be a problem, so you should check if you have PNG support enabled in your Qt build.
Try to reference to a PNG image on the web (for instance http://files.iconfactory.net/news/CandyBar.png
), and see if it shows up. If it does, PNG is supported and the problem is security restrictions within WebKit.