PySide SVG image formats not found?
I am using PyDev plugin for Eclipse with Qt integration. I have PySide installed and I am having trouble with SVG image formats. I know when I run my application the formats located here C:\Python27\Lib\site-packages\PySide\plugins\imageformats are found. All but the SVG format. I can remove the qico4.dll and it no longer finds them and put it back in and it finds them again.
I am using this line in my code: plugs = QtGui.QImageReader.supportedImageFormats()
It finds all of the formats except the SVG format from the qsvg4.dll? Why would this be? I have searched and searched and searched and can’t seem to find out why. Am I the only one with this problem or does the format just not show up in the supported image formats?
Yes they all exist in the same place.
I can use “from PySide import QtSvg” just fine.
I ‘m trying to use an SVG image the same way I would an ICO image in a style sheet. The ico works whether I put it in a resource file or just link to it directly. The svg files won’t work either way. This is why I’m confused. It seems like the interpreter is looking elsewhere for the qsvg4.dll? Or something else needs to be done to specify it as an image format?
If no other Qt library(such as PyQt4, Qt SDK, …) exists in your system, It may be a bug of PySide.
If more that one Qt libraries exist in your system, be careful, careful, careful again. ;-)
If so, maybe you can try following steps:
start cmd.exe * set PATH=I:\Python27\Lib\site-packages\PySide;PATH * python yourscript.py
Hope this is useful for you.