Make use of QTextDocument's modification