Hello Szilvi!

Have you considered using qwt to draw diagrams?

If you insist on doing it yourself in a graphicsview, create a class derived from QGraphicsItem and reimplement the paint function. The paint function recieves a pointer to a painter, which you can use to draw your diagram. If you have calculated the diagram-points you can draw them using drawPolyline or drawPoints.

HIH

Johannes