Record, replay and serialize Qt4.8 events