Page 1 of 3 123 LastLast
Results 1 to 20 of 47

Thread: QWebView doesn't show JPEG images on a clean XP machine

  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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.

  2. #2
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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.

  3. #3
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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.

  4. #4
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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?

  5. #5
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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.

  6. #6
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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...

  7. #7
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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?

  8. #8
    Join Date
    Feb 2011
    Posts
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default 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");
    Last edited by janton; 22nd July 2011 at 19:22.

  9. #9
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QWebView doesn't show JPEG images on a clean XP machine

    Quote Originally Posted by mentalmushroom View Post
    I am not very familiar with dependency walker, but it fails to process qjpeg4.dll
    Fails how?

    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

    I thought Qt samples should work out of the box.
    If the plugin is available then yes.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #13
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: QWebView doesn't show JPEG images on a clean XP machine

    This is how dependency walker fails when processing qjpeg4.dll


    This is imageviewer qt sample along with necessary qt dlls, Visual Studio CRT dlls and plugin dlls:


    This is the content of imageformats directory:


    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:
    Last edited by mentalmushroom; 9th August 2011 at 09:31. Reason: wrong image posted

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  15. #15
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default 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).
    Last edited by mentalmushroom; 9th August 2011 at 10:35.

  16. #16
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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/
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  17. #17
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: QWebView doesn't show JPEG images on a clean XP machine

    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.
    Last edited by mentalmushroom; 9th August 2011 at 11:52.

  18. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QWebView doesn't show JPEG images on a clean XP machine

    Quote Originally Posted by mentalmushroom View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  19. #19
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: QWebView doesn't show JPEG images on a clean XP machine

    Hm.. But other people also have this on VMWare

  20. #20
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QPixMap doesn't show one of two images !
    By ladiesfinger in forum Qt Programming
    Replies: 5
    Last Post: 10th January 2011, 16:29
  2. Replies: 10
    Last Post: 9th September 2010, 16:43
  3. Replies: 2
    Last Post: 22nd March 2010, 08:54
  4. Problem with displaying jpeg and gif images, in QT4
    By node_ex in forum Installation and Deployment
    Replies: 1
    Last Post: 23rd September 2008, 15:29
  5. JPEG Images not shown in QiconView using QT3??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 20:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.