PDA

View Full Version : How can i implement "Undo" action?



suseway
29th October 2010, 11:24
How can i implement "Undo" action in this (http://doc.qt.nokia.com/latest/widgets-scribble.html) example?

I have tried to look at description of undo framework here (http://doc.qt.nokia.com/4.6/tools-undoframework.html), but not understand how can i
use this for my purpose in this (http://doc.qt.nokia.com/latest/widgets-scribble.html) example...

wysota
29th October 2010, 11:32
Each operation you perform has to be embedded in a semantic command (e.g. "draw point", "draw line") that can perform the operation and also perform the inverse of it (so in case of "draw point" it would restore the state of the environment to exactly what it was before the point was drawn).