'Override Qt method.
Painting the scroll flag area'

def paintEvent(self, event):

    make_flag = self.make_flag_qrect
    make_slider = self.make_slider_range
    painter = QPainter(self)
    painter.fillRect(event.rect(), self.editor.sideareas_color)
    block = self.editor.document().firstBlock()
    for line_number in range(1, (self.editor.document().blockCount() + 1)):
        data = block.userData()
        if data:
            position = self.value_to_position(line_number)
            if data.code_analysis:
                color = self.editor.warning_color
                for (_message, error) in data.code_analysis:
                    if error:
                        color = self.editor.error_color
                        break
                self.set_painter(painter, color)
                painter.drawRect(make_flag(position))
            if data.todo:
                self.set_painter(painter, self.editor.todo_color)
                painter.drawRect(make_flag(position))
            if data.breakpoint:
                self.set_painter(painter, self.editor.breakpoint_color)
                painter.drawRect(make_flag(position))
        block = block.next()
    if self.editor.occurrences:
        self.set_painter(painter, self.editor.occurrence_color)
        for line_number in self.editor.occurrences:
            position = self.value_to_position(line_number)
            painter.drawRect(make_flag(position))
    if self.editor.found_results:
        self.set_painter(painter, self.editor.found_results_color)
        for line_number in self.editor.found_results:
            position = self.value_to_position(line_number)
            painter.drawRect(make_flag(position))
    pen_color = QColor(Qt.white)
    pen_color.setAlphaF(0.8)
    painter.setPen(pen_color)
    brush_color = QColor(Qt.white)
    brush_color.setAlphaF(0.5)
    painter.setBrush(QBrush(brush_color))
    painter.drawRect(make_slider(self.editor.firstVisibleBlock().blockNumber()))
