Results 1 to 8 of 8

Thread: QWebView not displaying images

  1. #1
    Join Date
    Aug 2009
    Location
    Lancashire UK
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QWebView not displaying images

    Does anyone have any idea why images would not be displayed in all web pages shown in a QWebView on a MAC (i386) ? This is true for all images in all web pages.
    The same code, displaying the same web pages, shows images fine on linux and win32, and even on a Power PC MAC.

  2. #2
    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 not displaying images

    Did you copy the image plugins to the target machine?
    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.


  3. #3
    Join Date
    Aug 2009
    Location
    Lancashire UK
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView not displaying images

    Thanks for the reply.

    Sorry, not sure what you mean. Our guru built QT on the MAC from source, as he did on the other machines, so I am not sure what these "image plugins" are. Are they things you have to include in the Qt build configuration ? Are they libraries or what ?

  4. #4
    Join Date
    Aug 2009
    Location
    Lancashire UK
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView not displaying images

    Correction. I have just looked at the plugins directory and it seems correct. In there are libqgif.a plus all the others (png, jpeg, tiff etc.). Only static libraries are in there, presumably since Qt was configured to build with static libraries.

    Other displays of gifs, jpegs etc. accessed via QPixmaps are working fine. The only problem is with images in a QWebView.

  5. #5
    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 not displaying images

    Qt can't use plugins when built in static mode. You need to specifically add static plugins to your project's code. Refer to the docs on static plugins for details. Tell that to your guru as well
    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. #6
    Join Date
    Aug 2009
    Location
    Lancashire UK
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView not displaying images

    Thanks. I had not intentionally (or even knowingly) wanted plugins to be used anyway.
    You are the one who mentioned plugins. Does this mean that all gif/jpeg/png/tiff is via plugins (or static plugins when necessary) ?

    If so, then why is there successful gif/jpeg/png/tiff support in other QObjects, namely QPixmap, which can load and display from such image files quite happily ?

    It is only QWebView which has the problem.

  7. #7
    Join Date
    Aug 2009
    Location
    Lancashire UK
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView not displaying images

    Apologies. GIFs, JPEGs and TIFFs are not working in QPixmaps either, PNG's are.
    And we now find that PNG's are working in WebView (just can't get the staff these days).

    You are no doubt absolutely correct about the static plugin scenario.
    I will get our guy onto it tomorrow, once he surfaces out of his Brisbane cave.

    Many thanks.

  8. #8
    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 not displaying images

    PNG is not handled by a plugin. PNG and XPM are the only two formats that are handled by Qt library itself. All others are through plugins.
    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. QWebview not showing images
    By manojmka in forum Qt Programming
    Replies: 27
    Last Post: 16th July 2012, 23:22
  2. QScrollArea not displaying large number of images
    By lpkincaid in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2009, 09:58
  3. QWebView shows '?' instead of all images
    By doep in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2009, 10:03
  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. Displaying real time images
    By Sheetal in forum Qt Programming
    Replies: 9
    Last Post: 22nd February 2007, 11:29

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.