문제

So, I made a Qt application on Qt Creator that displays jpg files and mp3 files(using phonon). On deploying the application with dynamic linked libraries I had to copy to the same folder QtCore4.dll, QtGui4.dll, phonon4.dll, mingwm10.dll and libgcc_s_dw2-1.dll as required by Windows.

The problem is that the jpg files and mp3 files are only shown on pcs with the QtSDK installed. In other pcs the exe file runs, opens the user interface and does everything right except showing jpg and mp3 files. The directory path is not the problem because it opens a pdfviewer that I put in the same folder. Do I need to provide other files?

도움이 되었습니까?

해결책

Qt relies on plugins for most of the file formats. For Jpeg you will need to include the qjpeg4.dll found in the plugins/imageformats directory. For Phonon, you will also need to include the appropriate backend DLL found in the plugins/phonon_backend directory.

All the information you need is contained within the Qt documentation on Deploying an Application on Windows and especially the section on Qt Plugins.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top