def QIcon_from_Icon(icon):
    qicon = QIcon()
    for icon_image in icon.images:
        image = icon_image.image
        if not image:
            continue
        mode = ICON_MODE[icon_image.mode]
        state = ICON_STATE[icon_image.state]
        qimage = get_cached_qimage(image)
        qpixmap = QPixmap.fromImage(qimage)
        qicon.addPixmap(qpixmap, mode, state)
    return qicon
Convert the given Enaml Icon into a QIcon.
dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/q_resource_helpers.py/QIcon_from_Icon