@memoize
def from_style(key):
 style = QtGui.QApplication.instance().style()
 return style.standardIcon(key)

@ memoize def from_style ( key ) : style = QtGui . QApplication . instance ( ) . style ( ) return style . standardIcon ( key )
maintain a cache of standard icons and return cache entries .