I’m reading a tutorial on PySide and I was thinking , do I need to find my own icons for every thing or is there some way to use some built in icons . That way I wouldn’t need to find an entire new set of icons if I want my little gui to run on another desktop environment .
Share
What you need is Pyside QIcon.fromTheme function.
Basicaly it creates QIcon object with needed icon from current system theme.
Usage:
undoicon = QIcon.fromTheme("edit-undo")“edit undo” – name of the icon “type”/”function” can be found here
This works on X11 systems, for MacOSX and Windows check QIcon documentation
QIcon.fromTheme
Edit Inserting this from the website, since last time it was a broken link.