Thursday, November 12, 2009

[Solution] QWebView does not show GIF or JPEG images


QWebView does not show GIF and/or JPEG images.


  1. In the directory where your Qt application is located, create a subdirectory with imageformats name.
  2. Copy there image plug-ins from the following directory: $(QTDIR)\plugins\imageformats
See more: Deploying an Application on Windows: Qt Plugins


  1. Thank you very much.. It really helps.

  2. Thank you very Very very Very very Very very much, and it's not a copy/past ;)

  3. I found a different issue. On my system, the example browsers and everything worked but my own code did not. It turns out that calling load (QUrl)("C:\\test.html") loads the text but no images. Changing this to (QUrl) ("file:///c:/test.html") works properly and loads the images! It seems like the webkit parses the name of the URL and makes some sort of decision based off the file name?! This could be behind some of the problems for some users.