Use dynamic module access also inside the Qt5 GUI module

Looks like some code has not been converted yet, causing issues.
Import cleanup