Add a class derived from QGraphicsScene to handle painting event. Still flickering.
Change how mouse events where handled and move the timer outside the class.