Why this lines of code return an error:
qp.drawText(left, offset + blockTop + line.y(), rightMargin, line.height(), Qt.AlignRight, str(lineCount)
In the paintLineNumber function