def paint(self, painter, option, mi):
        # Delegate to our superclass to draw the background
        QtGui.QStyledItemDelegate.paint(self, painter, option, mi)

        # Now draw the pixmap
        name = mi.data(QtCore.Qt.DisplayRole)
        pixmap = self._get_pixmap(name)
        if pixmap is not None:
            target = QtGui.QStyle.alignedRect(QtCore.Qt.LeftToRight,
                                              QtCore.Qt.AlignCenter,
                                              pixmap.size(), option.rect)
            painter.drawPixmap(target, pixmap)
Reimplemented to draw images.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/image_enum_editor.py/ImageEnumItemDelegate.paint