Refactor qt import logic. Fixes #2955
added QT_API_DEFAULT Qt option. Fixed reversed MPL qt logic test.
Merge pull request #2957 from ChrisBeaumont/qt_refactor

Refactor qt import logic.

Closes #2955