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:
Code:
<RCC>
<qresource>
<file>BalloonSat.svg</file>
<file>dash.gif</file>
<file>dashdot.gif</file>
<file>dashdotdot.gif</file>
<file>dot.gif</file>
<file>dots.gif</file>
<file>lines.gif</file>
<file>solid.gif</file>
<file>steps.gif</file>
<file>sticks.gif</file>
</qresource>
</RCC>
Which is located in the /icons directory (in the .pro there is "RESOURCES += icons/BalloonSat.qrc"). Then I load images like here:
Code:
fWindow
->setWindowIcon
(QIcon(":BalloonSat.svg"));
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
Re: Application doesn't display images
I think you need to put the image plugins in an imageformats subdirectory. See deploying on Windows.
Re: Application doesn't display images
Quote:
Originally Posted by
numbat
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
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