Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to determine what has been deleted in a QTextDocument?
Ian Monroe last edited by
QTextDocument::contentChanged tells you how many characters have been removed, but not what has been removed. I'm looking into storing QTextBlocks or similar and comparing before and after... but it sounds complicated and error-prone.
tucnak last edited by
While I was working with QTextDocument, I experienced the same problem. In this case I would like to reimplement QTextDocument and handle all those changes with protected methods. I am pretty sure there is a good solution of this problem in this case.