procatmer
procatmer

Reputation: 5649

Qt release doesn't show image

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

Answers (1)

Nejat
Nejat

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.

  • In Qt4 : qjpeg4.dll, qsvg4.dll, qico4.dll, ...
  • In Qt5 : 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

Related Questions