When I use QTextEdit::setText() , changes seems to be inrevokable , you can't get back with CTRL+Z
, is there any other API I should use ?
Asked
Active
Viewed 398 times
2 Answers
2
Instead of
textEdit->setText("your text");
do this:
textEdit->clear();
textEdit->append("your text");
0
To support undo/redo functionality properly in your application you may want to take a look at the Qt's Undo Framework documentation.

dschulz
- 4,666
- 1
- 31
- 31