Reputation: 5649
I’ve been working on qt for 4-5 months now. and I’ve managed to create my first app using qt. i wanted to deploy my app. it is weird every time i run it through Qt, the images always show up. but, when I run it through release folder ( myApp.exe ), the images won't show up.
I’ve found some guide about putting .dll file and something to do with qt plugins. but, I found it hard to understand. could somebody explain to me in a simple way about how to do it? or could someone give me an example of its implementation?
BTW, I’m using QImage
and QLabel
to show the images.
sorry for my English. I hope you guys understand the problem I’m facing.
Upvotes: 2
Views: 1330
Reputation: 32685
When deploying, you should place the dlls of plugins for image formats in a directory named imageformats
alongside the application executable to show the images and icons.
qjpeg4.dll
, qsvg4.dll
, qico4.dll
, ...qjpeg.dll
, qsvg.dll
, qico.dll
, ...These files could be found in the Qt installation directory in plugins/imageformats
. Just copy the necessary ones to the imageformats
directory beside your application executable file.
Upvotes: 1