Results 1 to 4 of 4

Thread: Application doesn't display images

  1. #1
    Join Date
    May 2009
    Posts
    29
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Application doesn't display images

    Hi there,
    When developing my application on Qt Creator and I launch the program from there, all goes fine. Also when executing the .exe locally.

    But when i try the program on another computer (Windows XP SP3) which doesn't have Qt installed, images are not displayed. These images are svg and gif. I configured Qt with the option -qt-gif but I think that the problem isn't gif images because also svg images are not displayed.

    With the program executable I supply also these files:
    • libgcc_s_dw2-1.dll
    • mingwm10.dll
    • qgif4.dll
    • qsvg4.dll
    • QtCore4.dll
    • QtGui4.dll


    Images are embedded in the .exe files through the qrc resource file:
    Qt Code:
    1. <RCC>
    2. <qresource>
    3. <file>BalloonSat.svg</file>
    4. <file>dash.gif</file>
    5. <file>dashdot.gif</file>
    6. <file>dashdotdot.gif</file>
    7. <file>dot.gif</file>
    8. <file>dots.gif</file>
    9. <file>lines.gif</file>
    10. <file>solid.gif</file>
    11. <file>steps.gif</file>
    12. <file>sticks.gif</file>
    13. </qresource>
    14. </RCC>
    To copy to clipboard, switch view to plain text mode 
    Which is located in the /icons directory (in the .pro there is "RESOURCES += icons/BalloonSat.qrc"). Then I load images like here:
    Qt Code:
    1. fWindow->setWindowIcon(QIcon(":BalloonSat.svg"));
    To copy to clipboard, switch view to plain text mode 

    Using Windows XP SP3, Qt 4.5.3 and Qt Creator 1.3.0

    Anyone can help me?

    Sorry for my english, hope you can understand my problem

    Thanks, Dario

  2. #2
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Application doesn't display images

    I think you need to put the image plugins in an imageformats subdirectory. See deploying on Windows.

  3. #3
    Join Date
    May 2009
    Posts
    29
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application doesn't display images

    Quote Originally Posted by numbat View Post
    I think you need to put the image plugins in an imageformats subdirectory. See deploying on Windows.
    Really thanks, that solved the gif problem!

    But I still have the svg problem. When setting the icon like specified before, this icon is correctly displayed in QMainWindow and related QDialogs bars. But I want to show the icon also in the about messagebox (QMessageBox::about(...)) like in the "browser" demo of Qt. Actually it is displayed in the about bar but not near the text.

    Now the dll's are located like:
    • libgcc_s_dw2-1.dll
    • mingwm10.dll
    • QtCore4.dll
    • QtGui4.dll
    • imageformats/qgif4.dll
    • imageformats/qsvg4.dll
    • iconengines/qsvgicon4.dll


    Thanks, Dario

  4. #4
    Join Date
    May 2009
    Posts
    29
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application doesn't display images

    Solved, svg icon need QtSvg4.dll

    Final dll's:
    • libgcc_s_dw2-1.dll
    • mingwm10.dll
    • QtCore4.dll
    • QtGui4.dll
    • QtSvg4.dll
    • imageformats/qgif4.dll
    • imageformats/qsvg4.dll


    Thanks

    Dario

Similar Threads

  1. problem in Display sequence of DICOM images
    By vincat in forum Qt Programming
    Replies: 0
    Last Post: 26th May 2009, 06:42
  2. Replies: 8
    Last Post: 8th May 2009, 09:14
  3. Can QTextBrowser display remote images?
    By golnaz in forum Newbie
    Replies: 1
    Last Post: 21st January 2009, 13:45
  4. How to display images in QTextBrowser ?
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2007, 08:58

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.