Showing JPG image with Qt does not work with release executable

♀尐吖头ヾ 提交于 2019-11-28 00:20:25

Therefore I copied the contents of the plugin folder of Qt into the application directory (where collidingmice.exe is).

You need to put the plugins into an "imageformats" subdirectory, e.g. like

bin
 ├── collidingmice.exe
 └── imageformats
       ├── qjpeg4.dll
       ├ ...

See also http://www.qtcentre.org/threads/46927-Location-of-imageformats-directory


It turned out that the OP had already set up the directory structure accordingly. The root cause was that a wrong QtGui4.dll has been loaded. This can be fixed "by copying the DLL directly into the application directory or by changing the order of the paths in the PATH environment variable so that your Qt bin directory is placed in front of all other paths containing a QtGui4.dll."

In any case, the Process Monitor is a good tool to track down such issues.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!