I'm facing for the first time this kind of problem: my input data are datetime events, and I have to draw they into a qgraphicsscene. In the diagramscene demo application I found all the basics to start drawing, but I didn't realize how to convert datetime events to x and y coordinates into scene.

If I have a qgraphicsscene that is 3000x3000 pixels wide, and a datetime interval that is three day long with some events inside, how could i translate this temporal coordinates to x and y ?