PDA

View Full Version : static sight on QGraphicsView



thgis
7th October 2010, 08:55
Hi.

I have a QGraphicsView where the view port is updated by the user. The view port has a static size of 200 x 200.
I want to add a sight to my view port. Fx. drawn two lines:
line1: (100 , 0) (100 , 200)
line2: (0 , 100) (200 , 100)

that comprise a cross in the center of my view port.

This sight should always follow the view port and i terms of the view port be static.

Can I do this without making a sub class of either QGraphicsView or QGraphicsScene?

If I have to make my own subclass of one of the mentioned Qt classes, what would be the easiest way to add a sight?

Regards,
Thomas