[Qt-interest] QWebKit not displaying images from disk

Ingomar Wesp ingomar at wesp.name
Tue Jun 2 23:05:32 CEST 2009


Greetings,

On Tuesday 02 June 2009 22:38:15 Marc Bowes wrote:
> I have an application which renders some HTML into a QWebView using
> setHtml. Occasionally, the renderer will insert an HTML img tag using
> a file from disk. On Linux, this might look like:
>
> <img alt="bar" src="file:///home/foo/bar.png" />
>
> And on Windows:
>
> <img alt="bar" src="file://C:/foo/bar.png" />
>
> However, only the Linux version displays the image. 

According to this post
<http://blogs.msdn.com/ie/archive/2006/12/06/file-uris-in-windows.aspx>, the 
correct URL should read "file:///C:/foo/bar.png" (note the additional slash). 

Maybe worth giving a try.

Best regards,
Ingomar Wesp




More information about the Qt-interest-old mailing list