qt - Get notified when a QTextEdit get a new Undo item -
my widget contains lots of qtextedit
controls. these qtextedits
installed item widgets qtreewidget
. these controls editable in place.
so, need implement unified "undo stack", process control + "z/y"
in widget instead of each qtextedit
control. have take record whenever qtextedit
make new undo item. when press control+z
, undo qtextedit
control's editing(by invoking undo() method), press again undo qtextedit
control's editing(by invoking undo() method).
but when searched through document,i found no such signal notifies me new undo item made qtextedit
. , have no idea undo policy of qtextedit
, sometime multiple keypress compressed 1 single undo item, using keypress eventfilter , record own qundocommand
not idea, not mentioned qtextedit
provide own convenient method undo()/redo().
how can arround this?
i guess qtextdocument::undocommandadded
signal you're looking for.
Comments
Post a Comment