How to change QTextBlockFormat for particular blocks without pushing undo items to undostack?
How to change QTextBlockFormat for particular blocks without pushing undo items to undostack?
You can do so using QTextCursor.
each time when i do QTextCursor::setBlockFormat, undo item is pushed into document internal undo stack.
a lot of QTextCursor::setBlockFormat calls push a lot of undo, which should not be pushed.
Look at QTextCursor::beginEditBlock()
QTextCursor::setBlockFormat should not change undo stack
Bookmarks