How to get QWebKit to display image?

Posted by George Edison on Stack Overflow See other posts from Stack Overflow or by George Edison
Published on 2010-04-28T05:45:41Z Indexed on 2010/04/28 5:53 UTC
Read the original article Hit count: 328

Filed under:
|
|
|

Okay, I have a Qt executable in the same directory as a file logo.png.

I call the following:

QString msg("<html><body><img src='logo.png' /></body></html>");

webView->setHtml(msg);

where webview is the QWebKit pointer

However, when I execute the program, the image does not display. I am executing the program from the directory that the image is in... why won't it display?

© Stack Overflow or respective owner

Related posts about qt

Related posts about qwebkit