fixed frame handling for qt_example after having adapted it to pupil