Use Qt undo/redo framework.