If you want to accumulate a set of marks on the page then you need to keep a persistent track of either the page or the actions required to draw it. I suggest you spend some time with the Scribble Example, particularly the ScibbleArea class.

For the axis reversal:
Coordinate System: Transformations
QPainter::scale() with a negative scale in the Y direction.