[Interest] Accessing undo/redo stack in QPlaintextEdit

Sensei senseiwa at gmail.com
Tue Jul 2 10:37:22 CEST 2013


On 7/2/13 9:48am, Wilhelm wrote:
> Am 02.07.2013 08:10, schrieb 程梁:
>> QPlainTextEdit do have implemented all features about redo/undo.
>
> Can you please tell me how to display the undo stack of a QPlaintextEdit
> in a QUndoView? I can't find a way to access (get a pointer to) the
> undo-stack of a QPlaintextEdit.

That I don't know.

However, you can create your own stack, and populate it accordingly by 
implementing your own functions, if you subclass QPlainTextEdit. See for 
instance (not a QPlainTextEdit, but it shows how to do that):

http://qt-project.org/doc/qt-4.8/tools-undoframework.html



Cheers!



More information about the Interest mailing list