Search code examples
windowsqtjpegqtwebkit

How can I get a jpeg image to display in my Webkit Qt app?


I have created a Qt app which uses QtWebkit and a bunch of resources (HTML, JS, CSS and a JPEG image) as a proof-of-concept for deploying a "web-app" as a cross-platform (Win/Mac) desktop application with "native" file load and save functionality.

The app compiled first time on the Mac and works perfectly. I also eventually managed to compile it on Windows using MSVC2010 and it runs fine - displaying the jpeg - on my virtual dev machine (Parallels Windows Xp SP3) and also on a Windows 7 virtual machine.

However, it absolutely will not display the JPEG file on any other WinXP machine I try to run it on.

I have combed the web for a solution and have included all the pertinent dlls in their correct places (/imageformats/qjpeg4.dll) but it just won't work.

Source code is all available at https://github.com/theteep/Qt-Webkit-Wrapper

I am working with Qt 4.8.1.

I don't know about the etiquette of linking to ready-compiled software but would be happy to throw my windows deployment onto github if anyone wants to see it.

Any assistance would be massively appreciated, I really need to get this working for a client project!


Solution

  • Update: This is a really odd one, when I came back and rebooted my windows instance, then re-ran the executable, the image displayed correctly. Not a very satisfactory answer to my original problem I know, but at least it appears to be working.