def METHOD_NAME(self, painter, index):
    # XXX: we can't currently draw the caret when there's no
    # glyph on canvas
    offset = self._layoutManager.drawingOffset(index)
    if offset is None:
        return
    dx, dy = offset
    bottom, top = self.parent().verticalBounds()
    upm = top - bottom
    painter.save()
    pen = painter.pen()
    pen.setColor(QColor(90, 90, 90))
    pen.setWidth(0)
    painter.setPen(pen)
    painter.translate(dx, bottom + dy)
    painter.drawLine(-30, -25, 0, 0)
    painter.drawLine(0, 0, 30, -25)
    painter.drawLine(0, 0, 0, upm)
    painter.drawLine(-30, upm + 25, 0, upm)
    painter.drawLine(0, upm, 30, upm + 25)
    painter.restore()