It depends what exactly you want to do.

Probably the best would be just to have a modifed() flag in your editor and to read its state upon exit. For example it could work just like QDialog::exec() -- returning a value (for example true for modified and false for not modified). Of course the editor would be responsible for setting that flag.