Hide Widget when pointer is out of the widget size

Yes thank you for your answer and elaborate explanation! I had no idea that we can use override function to do so.Your answer surely helped me a lot. And yes I have added my UI inside another widget in a container :). To be on safe side i have also added another image with alpha set to 0 behind my desired UI.