Make sure that the imported qt backend is consistent with selected backend
Merge pull request #3632 from jenshnielsen/qt_fix

BUG : Fix handling QT_API ENVS