Porting to Qt 5.x. Issue #10