Painter example Undo/Ctrl-Z

I tried to figure out how to cancel a part of a drawing (using subsequent ctrl-Z or something). Would this be doable? (I could not make it…)

Hi @Paapu it should be! One simple way would be to take a snapshot of the current pixmap canvas on every mouse down (start drawing) and store this in a temporary variable. Then when Ctrl-Z is pressed (detected using a QAction) you can copy that back over the current canvas.