0

Qt image formats (jpeg) not supported in my app (builded with Qt 5.12 MinGW) on other computers. plugins already added to {appDir}/imageformats. I also tried to load qjpeg.dll dynaically by QLibrary::load().

2 Answers2

1

In my case, I could add it by QtCore.QCoreApplication.addLibraryPath("dll-path")

This code must be placed above the QApplication instance.

Please make sure the path name again.

And you add the code before making QtGui.QApplication instance.

If this answer is out the point, I will delete it.

Haru
  • 1,884
  • 2
  • 12
  • 30
  • "dll-path" is file folda name."plugin" in my case. Not directly .dll file. – Haru Feb 07 '19 at 01:13
  • C:\Python26\Lib\site-packages\PyQt4\plugins\imageformats from the [https://stackoverflow.com/questions/885906/enabling-jpeg-support-for-qimage-in-py2exe-compiled-python-scripts?rq=1] imageformats folda is – Haru Feb 07 '19 at 13:53
0

Problem Solved. The real problem comes from initializing a static variable of type QImage.