Following this tutorial, I wrote a little program with a QGraphicsView, and a paint function within a class that inherits QGraphicsItem, that can paint to that QGraphicsView. But here’s where I’m confused. If I say:
painter->drawLine(-50,-50,50,50);
in what coordinate system am I working? What determines where the origin is, and what counts as a unit? I know by messing around, that the dimensions of boundingRect() have something to do with it. But they clearly don’t determine the area. If I return:
return QRectF(0,0,200,200);
I can still draw the line above, and it doesn’t even appear at the edge of my drawing space! So where does the coordinate system arise and how can I control it?