SVG images dont appear after compiling PyQt4 python code with py2exe

房东的猫 提交于 2019-12-04 11:09:35

The plugin used (Qt 4.6) is:

  • plugins/
    • iconengines/
      • qsvgicon4.dll

You still need qt.conf as Ivo explained.

You have to add a qt.conf in your application's main installation directory (actually, the application's working directory), containing:

[Paths]
Plugins = <directory containing the image plugins directory>

So the directory layout is:

  • app.exe
  • qt.conf
  • plugins/
    • imageformats/
      • qsvg4.dll

And then in this case, the directory in qt.conf is plugins.

The qsvg plugin requires QtXml. Add "PyQt4.QtXml" to your includes.

Also see library dependencies in Qt.

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