Qt adaptation of Gael Varoquaux's tutorial