问题
As is written in the docs I would like to edit setThemeSearchPaths()
as from current code:
if __name__ == "__main__":
app = QtGui.QApplication([])
for path in QtGui.QIcon.themeSearchPaths():
print "%s/%s" % (path, QtGui.QIcon.themeName())
it prints out:
C:/Python27/icons/
:/icons/
And no icons are found. I would like to ask you what path do I have to pass as input argument in function setThemeSearchPaths()
on win7?
As I found out the icons should be on path/file:
C:\Windows\system32\imageres.dll
But if I input a path to .dll
file nothing happens?
回答1:
Windows doesn't have any icon themes. Qt uses freedesktop icon specification.
Using default paths, either extract your icon theme to C:/Python27/icons/
or embed it as a Qt resource.
You can try to download Faenza Icons. You should end up with file structure like:
icons/<theme name>/index.theme
icons/<theme name>/apps/
icons/<theme name>/actions/
...
来源:https://stackoverflow.com/questions/29392213/what-path-to-enter-in-pyqt-qicon-setthemesearchpaths-in-pyqt-on-win7