Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 47

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

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

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

    i also have the same problem with VMware 7.0.1 build-227600 and a clean windows XP


    Added after 1 25 minutes:


    we found the problem, will report back when we know the solution!
    Last edited by janton; 9th August 2011 at 13:59.

  2. #22
    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

    Ok, just found out that plugins require visual studio redistributable package installed or crt folder inside the imageformats directory. I think this is why most people don't experience problems with plugins, but users are not obligated to have vcredist installed.

  3. #23
    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
    but users are not obligated to have vcredist installed.
    If you build an application using MSVC then each and every one will require the C runtime from that compiler. It's quite common knowledge and many apps and games include vcredist in their installations and tell users to run it in case they experience problems.
    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.


  4. #24
    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

    Not every one. Some apps statically link those libs. For my project I simply include crt folder. It would be strange to install vcredist for a small tool.

  5. #25
    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
    Not every one. Some apps statically link those libs.
    Nothing prevents you from doing the same (including statically linking the image plugins). Just remember that if you statically link the application, you include a static version of the C runtime as well, as regardless of linking mode the C runtime is still required.
    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.


  6. #26
    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

    Is it possible to link qt plugins statically when I use compiled binaries? I tried to build and got this error:
    Qt Code:
    1. error LNK2019: unresolved external symbol "class QObject * __cdecl qt_plugin_instance_qjpeg(void)" (?qt_plugin_instance_qjpeg@@YAPAVQObject@@XZ) referenced in function "public: __thiscall StaticqjpegPluginInstance::StaticqjpegPluginInstance(void)" (??0StaticqjpegPluginInstance@@QAE@XZ)
    To copy to clipboard, switch view to plain text mode 
    Perhaps, compiled version allows dynamic linking only.

  7. #27
    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

    For linking statically you need statically linked versions of the libraries you use (including Qt and the C runtime of your compiler).
    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.


  8. #28
    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

    Is it possible to place plugin dlls to the folder other than imageformats? Namely I'd like to have those dlls nearby my exe-file, so I don't have to copy crt libraries two times.

    I tried QCoreApplication::addLibraryPath(qApp->applicationDirPath()), but it didn't work.

  9. #29
    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

    Not without rebuilding Qt. But you shouldn't need two crt sets, one is enough, provided they are the same crt file.
    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.


  10. #30
    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

    One crt folder is needed for exe file, another one is needed for imageformats directory. If I could place plugins to the same folder as exe then I could use only one crt folder.

  11. #31
    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
    One crt folder is needed for exe file, another one is needed for imageformats directory.
    Is it the same file? With the same size, timestamp, etc.? You're the only one who claims two crt files are needed, by the way, so something is wrong on your end and I doubt placing the plugin in the same directory as the executable would help.
    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.


  12. #32
    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 i told yesterday, image plugins don't work without vcredist. if installing vcredist is not an option it is possible to place crt libraries inside imageformats folder - then it works. another crt folder is needed for the project itself, because it was built with msvc 2008. yes, both crt folders are absolutely the same and i am trying to avoid duplication, but plugins don't work if i place them to the same directory as exe file.

  13. #33
    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
    as i told yesterday, image plugins don't work without vcredist.
    My question is very simple -- is it the same file (I'm not asking about the file name)? I assume you know what dll files are and how they work so you surely know that if this is the same file (or even exporting the same symbols), only one copy of the file will be open and the other will be totally ignored.
    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.


  14. #34
    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'd like to clear up what file are you talking about? If crt dlls, then yes, they are absolutely the same. I copied Microsoft.VC90.CRT folder into imageformats directory. It is stupid, but this is the only way I got images work in the browser on clean machine (without vcredist).

  15. #35
    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 copied Microsoft.VC90.CRT folder into imageformats directory.
    You copied the folder or its contents? Did you also copy this same folder (or its contents) to the directory containing your binary or were the crt files already there (or did you copy them from elsewhere)?
    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.


  16. #36
    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 tried it different:

    1) I have crt folder nearby my exe, but not inside the imageformats folder:



    As you can see, doesn't work.

    2) I have content of crt folder nearby my exe, but not inside imageformats folder:



    Also doesn't work.

    3) I have content of crt folder nearby my exe, also I have all plugin dlls there, so everything is in the same directory:



    Doesn't work either.

    4) I have crt folder nearby my exe, and the copy of it inside imageformats folder.



    Now it works.

  17. #37
    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

    Please use the attachment feature of the forum to attach images instead of using 3rd party sites.

    You have something seriously screwed up since as far as I know by default the Windows dynamic loader doesn't look into any subdirectories for dll files. Apparently the application manifest states the file should be found there. Check the manifest for your application and make sure Qt and your application are compiled using the same version of the compiler.

    Also if you built the program from within Visual Studio, please try building it from the command line using qmake && nmake 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.


  18. #38
    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 you can see there is no manifest file for the application at all, and the application I tested was imageviewer. It is a sample qt app, I didn't even build it, just copied exe file to my virtual machine. But generally, yes, I use Microsoft Visual Studio 2008 SP1 and I already had problems with manifest and libraries, but this is not the case, I think.

  19. #39
    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
    As you can see there is no manifest file for the application at all
    As far as I know the manifest is embedded into the binary file. You need to extract it and have a look. How to do that is out of scope of this forum though, I'm sure you'll find something using your favourite search engine. It's likely you tweaked some configuration in visual studio (or your build system) during your previous struggles with manifests which somehow influences your current setup. Did you try building from the command line as asked?
    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.


  20. #40
    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 didn't build it. I downloaded Qt binaries here (only it was 4.7.2 at that time), then installed it, found imageviewer sample and copied exe file to a clean XP on my virtual machine. If somebody tweaked visual studio configuration, that was not me, but Qt people who created those binaries. As long as the test application is qt sample I post it to Qt forum. I guess Microsoft people won't help me much with Qt demo.

    If something is done wrong in Qt binaries, I hope it to be fixed. Otherwise, I'd like to know how to run those samples, because as you can see it is not that easy to run when Visual C++ Redistributable is not installed.

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.