Qt5 porting started

Needs a package to test properly but opening a pull request nevertheless.