Reputation: 1172
I'm got this project where i'm showing images with a qt5 interface, i'm simply setting the Pixmap of a label with the qimage pixmap
The thing is, it's working on a debug build, but not on a release build and i dont understand why.
I already got a folder in my .Exe folder named "plugins" and a subfolder in it named "imageformats", and in this folder the file named "qjpeg.dll"
So i coming here to see if someone has an idea on why it doesn't work ?
Thanks in advance !
Upvotes: 4
Views: 1097
Reputation: 2718
I'm assuming that you developed your app in Qt Creator, and that you're not using a .qrc file.
This is the folder structure that Qt expects (left side if you launch your app from Qt Creator, right side if you launch your app by double-clicking its icon):
[Dev]\pic.jpg => [App]\pic.jpg
[Dev]\release\app.exe => [App]\app.exe
[Qt]\bin\*.dll => [App]\*.dll
[Qt]\plugins\platforms\qwindows.dll => [App]\platforms\qwindows.dll
[Qt]\plugins\imageformats\qjpeg.dll => [App]\imageformats\qjpeg.dll
---------------------------------------------------------------------
[Qt] = Folder where you installed Qt
[Dev] = Folder where you built your app
[App] = Folder where you want to deploy your app
Two common mistakes:
Upvotes: 3