fix qt_loader import hook signature

to match PEP 302

closes #5932