Results 1 to 11 of 11

Thread: Demo Browser cannot display jpeg or gif

  1. #1
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Exclamation Demo Browser cannot display jpeg or gif

    i use the demo browser which is provided by qt
    it can go to the website, but it cannot display the jpeg and gif file.

    can anyone help me?
    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Demo Browser cannot display jpeg or gif

    Make sure you provide the needed image plugins for displaying jpeg and gif.

  3. #3
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Demo Browser cannot display jpeg or gif

    thanks for your reply.

    but i dont know which image plugins that i need.
    i just use the demo browser, but havent change any codes.

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Demo Browser cannot display jpeg or gif

    Quote Originally Posted by stmk View Post
    but i dont know which image plugins that i need.
    The jpeg and the gif plugin and any other image format you want to be displayed.
    i just use the demo browser, but havent change any codes.
    Yeah, but you must make sure Qt finds the plugins locationed under imageformats. If you run the browser from the Qt Comand Line, did you see the images? If you distribute the app, you have to deliver the plugins alongside your app. See http://doc.trolltech.com/4.7/deployment-windows.html

  5. #5
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Demo Browser cannot display jpeg or gif

    actually, the demo browser can display the jpeg and gif in my computer (which is installed qt and the vs2008)

    however, when i put the browser.exe (rebuild the program wihtout changing any codes) in another computers (which does not installed qt and vs2008),
    it can still go to the website, but cannot display jpeg or gif

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Demo Browser cannot display jpeg or gif

    Quote Originally Posted by stmk View Post
    however, when i put the browser.exe (rebuild the program wihtout changing any codes) in another computers (which does not installed qt and vs2008),
    it can still go to the website, but cannot display jpeg or gif
    And that's why I post you the link. You have to deliver the plugins alongside your exe as it is described at the end of the linked page.

  7. The following user says thank you to Lykurg for this useful post:

    stmk (23rd October 2010)

  8. #7
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Demo Browser cannot display jpeg or gif

    thanks so much!

    I put the following code in the main function

    QCoreApplication::addLibraryPath(QCoreApplication: :applicationDirPath()+"/imageformats");

    then it works now!

  9. #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: Demo Browser cannot display jpeg or gif

    Do you have an "imageformats" subdirectory inside your "imageformats" directory?
    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. #9
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Demo Browser cannot display jpeg or gif

    no

    actually, i put the "imageformats" folder in the release folder (browser.exe also inside in release folder)
    \browser\release\imageformats

    when i click browser.exe, it can show the jpeg and gif

  11. #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: Demo Browser cannot display jpeg or gif

    Then remove the addLibraryPath() call because it doesn't do anything. It would work if you had an imageformats subdirectory in imageformats directory.
    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. The following user says thank you to wysota for this useful post:

    stmk (23rd October 2010)

  13. #11
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Demo Browser cannot display jpeg or gif

    i see..
    thanks so much anyway!

Similar Threads

  1. Demo Browser doesn't display jpeg, gif
    By dmt0 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 17th January 2011, 11:59
  2. QT 4.5 Embedded Linux Demo Web Browser does not work
    By saltuka in forum Qt Programming
    Replies: 1
    Last Post: 1st November 2010, 04:11
  3. Not able to run fancy browser and demo browser example applications
    By GoGetIt in forum Installation and Deployment
    Replies: 1
    Last Post: 16th August 2010, 06:23
  4. QT Demo browser does not work !
    By torpedo in forum Qt Tools
    Replies: 3
    Last Post: 7th April 2009, 10:56
  5. Can't display .jpg,.jpeg file in my QT app
    By Shalabh in forum Qt Programming
    Replies: 3
    Last Post: 23rd April 2007, 14:52

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.