QWebView doesn't show JPEG images on a clean XP machine
I use QWebView in my application. On my machine where Qt 4.7.2 and visual studio 2008 are installed QWebView displays images without any problems. But when I tried to run it on a clean XP SP2 it didn't.
Found some posts about the same problem:
http://www.qtcentre.org/archive/index.php/t-17469.html
http://stackoverflow.com/questions/4...ent-on-windows
As it was suggested there, I copied imageformats folder to the directory where my app is located. So the file/folder structure is "MyAppFolder\imageformats" and "MyAppFolder\myapp.exe". But still have no JPEG images displayed. By the way, Qt sample facybrowser has the same problem.
Re: QWebView doesn't show JPEG images on a clean XP machine
use dependency walker to find out the dependencies. BTW copying imageformats was all that was needed... but you can read more on deploying qt applications in qt assistance.
Re: QWebView doesn't show JPEG images on a clean XP machine
as far as i see both applications don't even try to load that plugins: dependency walker doesn't show me qjpeg4.dll or any other image plugin.
Re: QWebView doesn't show JPEG images on a clean XP machine
yes since it is a plugin, it will not come as qjpeg4.dll but some other strange dlls missing. I use it in case of plugins to know if plugins are being detected. Does the dependency walker show any troubles?
Re: QWebView doesn't show JPEG images on a clean XP machine
It tells cannot find MSJAVA.DLL, also I see a mismatch in QTCORE4.DLL checksum and, finally, it tells "Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.", but i see those messages in most any application.
Re: QWebView doesn't show JPEG images on a clean XP machine
check if this link is relevant to you...qjpeg4 on some systems ,
msjava.dll afaik is used by sql drivers..have you added em too... since they too are plugins... but i may be wrong...
Re: QWebView doesn't show JPEG images on a clean XP machine
well that was for qt demo application called fancybrowser. people say it normally displays images. i don't care much about how it deals with java or sql dirvers, the only need is to make images work. did you try that sample on a clean machine?
Re: QWebView doesn't show JPEG images on a clean XP machine
Perhaps you need to build it with:
qApp->addLibraryPath("C:/customPath/plugins");
http://doc.trolltech.com/4.7/deploym...tml#qt-plugins
By default, the plugins subdirectory of the Qt installation is the first plugin search path. However, pre-determined paths like the default one have certain disadvantages. For example, they may not exist on the target machine. For that reason, you need to examine various alternatives to make sure that the Qt plugins are found... (more in the link)
Added after 7 minutes:
or this:
QCoreApplication::addLibraryPath(QCoreApplication: :applicationDirPath()+"/imageformats");
Re: QWebView doesn't show JPEG images on a clean XP machine
Nothing helps, still didn't find the solution. Also noticed the same problem with QImage::load. Yet another Qt sample (imageviewer) is unable to load images on clean XP. I tried it on different machines with the same success. Could someone be so kind to create a small sample application that is able to load JPEG image on the clean XP. For now looks like a Qt bug. I tried only Qt 4.7.2, not sure about later versions.
Re: QWebView doesn't show JPEG images on a clean XP machine
If the plugin doesn't load, then no Qt application will display JPEG images. Make sure you have the proper imageformats directory copied -- if your app is built in debug mode, you need plugins in debug version as well, if it's built in release mode, you need release mode plugins. In doubt compare the output of dependency walker ran on the main application binary and the plugin dll, check that both reference the same Qt DLLs.
Re: QWebView doesn't show JPEG images on a clean XP machine
I use release version of my project and release version of qjpeg plugin (without 'd' letter). I have imageformats directory in the same folder as my exe-file located. I am not very familiar with dependency walker, but it fails to process qjpeg4.dll. Also I don't see qjpeg dll in the dll list of my application (or any other application mentioned here). Should I somehow manually load this plugin in order to get images displayed? I thought Qt samples should work out of the box.
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Originally Posted by
mentalmushroom
I am not very familiar with dependency walker, but it fails to process qjpeg4.dll
Fails how?
Quote:
Also I don't see qjpeg dll in the dll list of my application (or any other application mentioned here).
You won't see it because your application doesn't depend on qjpeg.dll
Quote:
I thought Qt samples should work out of the box.
If the plugin is available then yes.
Re: QWebView doesn't show JPEG images on a clean XP machine
This is how dependency walker fails when processing qjpeg4.dll
http://xmages.net/storage/10/1/0/0/5...d/29008e5c.png
This is imageviewer qt sample along with necessary qt dlls, Visual Studio CRT dlls and plugin dlls:
http://xmages.net/storage/10/1/0/f/0...d/bcd72560.png
This is the content of imageformats directory:
http://xmages.net/storage/10/1/0/3/5...d/ddeb6fa3.png
Finally, here you can see how imageviewer sample "nicely" fails to load an ordinary jpeg file. Also fancy browser doesn't show images while opera browser displays it very well for the same site on the same system:
http://xmages.net/storage/10/1/0/8/f...d/377f94d1.png
Re: QWebView doesn't show JPEG images on a clean XP machine
Is your Qt built against MSVC or MinGW? How did you install Qt in your system?
Re: QWebView doesn't show JPEG images on a clean XP machine
I downloaded ready-made binaries for visual studio 2008 and installed with the standard installer it comes with. I am talking about the machine where I develop the project (Windows 7 x64 + Visual Studio 2008 + Qt 4.7.2) that has no image showing problem. The target machine is clean XP, so I simply copy needed dlls along with my exe (as shown in the previous post).
Re: QWebView doesn't show JPEG images on a clean XP machine
I don't know why Dependency Walker can't process your jpeg plugin but probably because of the same reason also your application can't load it. Maybe it's a matter of architecture (64b vs 32b) as the target machine seems to be 32b (x86)? We can't help you much without access to your computer, so you're on your own here. The only advice I can give you is that you need to make sure your app can load the qjpeg plugin. Maybe this helps somehow: http://buffered.io/2008/05/17/resolv...ration-issues/
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Maybe it's a matter of architecture (64b vs 32b) as the target machine seems to be 32b (x86)?
Yes, target is x86, but I develop only x86 version, so if there was something related to x86/x64, I think I would rather have problems on windows 7 x64 than on XP x86. Anyway, also tried to build on Vista x86 - the same problem.
Just noticed that images don't work on clean Vista also. I suppose if you try it on your machine where clean windows OS is installed you will have the same, so access to my computer is not really needed. Already tried on several different machines. The problem is nobody wants to try it himself.
Added after 6 minutes:
Finally, it seems I found it! I have clean OS on my virtual machine (VMWare) and it doesn't work there, but on a real machine it works.
Re: QWebView doesn't show JPEG images on a clean XP machine
Quote:
Originally Posted by
mentalmushroom
I suppose if you try it on your machine where clean windows OS is installed you will have the same, so access to my computer is not really needed.
I believe you are wrong because I never had any serious problems with image plugins on any Windows machine (be it real or virtual). The problem is clearly with the machine configuration and not Qt itself.
Re: QWebView doesn't show JPEG images on a clean XP machine
Hm.. But other people also have this on VMWare
Re: QWebView doesn't show JPEG images on a clean XP machine
Maybe while installing the machine on VMWare something gets installed which causes the side-by-side configuration problems. Try using VirtualBox instead of VMWare and see if the problem persists.