Qt: Let Qt decide directories in Qt5. Require OSX use Qt5. Fix config directory. Fixes #5409.