Today we finally got an answer to our query on how to work with QGraphicsScene and QGraphicsItems.
We asked around on IRC and ML but didn’t get a reply. So we posted our query along with code of our demo application on Qt’s forum.
And at last somebody replied and pointed our mistake.
We were creating a scene directly in our mainwindow and each entity has its own mouse events associated with it like mousepress, mousemove, etc. and the paint event was also defined here.
But we have to handle events in the scene and not in the item. Only painting is to be done in item class. So now we have separate graphicsscene class which will handle the events.