I think it might be useful to those of you who are interested in automatic GUI testing or other related stuff - http://algoholic.eu/recording-and-re...-input-events/ (there's a demo, so please visit )

It was fun to implement anyway, so please enjoy it at least for a moment and please give feedback

Excerpt:
Today, I give you QInputEventRecorder class, BSD-licensed as always. It facilitates four functions: recording of input events, storing them in binary files (created using QDataStream), loading them back and replaying them with given speed factor. QInputEventRecorder captures events targeted at specified widget and all of its children. It assumes that all widgets have names. In case they don’t you can use QInputEventRecorder::nameAllWidgets(QWidget*) static method which gives unique names to all unnamed children of the specified widget. This method could be further enhanced to generate names in a more reproducible manner, to preserve validity of recordings after GUI modifications, particularly after reordering or insertion of new elements. This is one of the items on my hobby TODO list In general, event designates are remembered not only by their name but also by their relation to other widgets, e.g. if we have widget_2 which is a child of widget_1 (which has no parent) it’s going to be recorded as widget_1/widget_2, while widget_1 will be recorded simply as widget_1. As an extra precaution, class name of the target widget is also stored, which might be good or bad depending on if you plan to eventually swap classes of some widgets on your form.
Cheers