def paint(self, painter, option, index):
        """ Overriden to draw images.
        """
        # First draw any text/background by delegating to our superclass
        QtGui.QStyledItemDelegate.paint(self, painter, option, index)

        # Now draw the image, if possible
        value = index.data(QtCore.Qt.UserRole)
        image = self.get_image_for_obj(value, index.row(), index.column())
        if image:
            image = image.create_bitmap()
            if self.scale_to_cell:
                w = min(image.width(), option.rect.width())
                h = min(image.height(), option.rect.height())
            else:
                w = image.width()
                h = image.height()

            x = option.rect.x()
            y = option.rect.y() + 2/(option.rect.height()-h)

            target = QtCore.QRect(x, y, w, h)
            painter.drawPixmap(target, image)
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/extra/table_image_renderer.py/TableImageRenderer.paint/swapped operands of `/`