choose qt4 or qt5 automatically

I totally messed up my forked repository as I did not know how rebasing works so that I deleted it on github and created a new fork. But I think I understood the process now.