The "proper" way to do it would be to use the undo functionality Qt offers and have two things done at the same time. The down side is that you'd have to implement commands for all things you do in your application.
The "second proper" way would be to use QWidget's "windowModified" property. Of course you'd have to check the flag yourself everytime you change the document.
If the object is not a widget, then you have to do it the way you suggested.





Reply With Quote
Bookmarks