I'm using QTextDocument and related classes quite a lot and I came accross a problem : I want some text to be temporarily hidden. My current solution is to put it into a custom QTextBlockUserData which is attached to the block. The next problem is to ensure that this block can't be deleted and that the remaining text (which indicates that some text has been hidden) won't be modified. Is there any way to create a read-only" structure (block, frame, whatever...) within a QTextDocument ???
Another trouble is that the use of a block data sometimes break the Undo/Redo system because I di not find any way to catch this actions and adapt my custom block datas accordingly...
Bookmarks