def paint( self, painter, option, index ):
        """
        Overloads the paint method from Qt to perform some additional painting
        on items.
        
        :param      painter | <QPainter>
                    option  | <QStyleOption>
                    index   | <QModelIndex>
        """
        # draw the background
        edit = self.parent()
        item = edit.item(index.row())
        if ( not isinstance(item, XMultiTagCreateItem) ):
            if ( item.isSelected() ):
                painter.setBrush(edit.highlightColor())
            else:
                painter.setBrush(edit.tagColor())
            
            painter.drawRect(option.rect)
        
        painter.setBrush(Qt.NoBrush)
        painter.setPen(item.foreground().color())
        
        super(XMultiTagDelegate, self).paint(painter, option, index)
        
        # draw the border
        item = self.parent().item(index.row())
        if ( not isinstance(item, XMultiTagCreateItem) ):
            painter.setPen(edit.borderColor())
            painter.setBrush(Qt.NoBrush)
            painter.drawRect(option.rect)
            painter.drawText(option.rect.right() - 14,
                             option.rect.top() + 1,
                             16,
                             16,
                             Qt.AlignCenter,
                             'x')