Clean up the Qt code a bit. The only intended change is to use a different check for being polymorphed.