Saturday 11 August 2012

How to add support for svg icons in PySyde application

First and very important note - svg icons requires xml support
so we need to add next line in our code:

from PySide import QtSvg, QtXml

or add QtSvg4.dll and QtXml4.dll in your bin distribution folder. This will include needed libraries in your distribution if you use something like pyinstaller to make executables.

Copy "plugins/imageformats/qsvg4.dll" from your PySide installation folder to your distribution folder.

Add qt.conf file in your bin distribution folder.

Prefix = .
Binaries = .
Plugins = ../plugins
Translations = ../translations

No comments:

Post a Comment