[PySide] Get icons working on windows

Jonas Thiem jonasthiem at googlemail.com
Tue Apr 22 16:30:49 CEST 2014


Hi,

I tried to get icons working on Windows. To do that, I did the following steps:

1.) I created an "icons" subfolder (where the current working
directory of my application is when running)
2.) I built tango with ./configure && make on linux, and copied the
resulting folder into "icons\Tango\" (with the index.theme inside
etc.)

Then I used the following code in my application startup:

        if QIcon.themeName() == "":
            QIcon.setThemeSearchPaths(os.path.abspath("icons"))
            QIcon.setThemeName("Tango")
            assert(QIcon.themeName() == "Tango")
        assert(len(QIcon.themeName()) > 0)

No assert fails, no error happens or anything. But all the stock icons
from my PySide application are still missing. (They work perfectly
fine on Linux/Gnome 3)

Since there is no error or warning or anything, I don't know what to
do from here. Any suggestions?

Regards,
Jonas Thiem



More information about the PySide mailing list