示例#1
0
def get_std_icon(name, size=None):
    """Get standard platform icon
    Call 'show_std_icons()' for details"""
    if not name.startswith('SP_'):
        name = 'SP_' + name
    icon = (QWidget().style().standardIcon(getattr(QStyle, name)))
    if size is None:
        return icon
    else:
        return QIcon(icon.pixmap(size, size))
示例#2
0
def get_icon(name):
    """Return QIcon from icon name"""
    return QIcon(osp.join(config.IMAGE_PATH, name))