Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top