1. Added destructor to account for correct Qt window destruction.