I have a QMainWindow application that generates multiple QWidget popups. I would like to know how I can destroy the pop up QWidgets if the user clicks on the main QMainWindow. I am not sure how to proceed with the resolution of this problem. I do not want to interfere with any QMainWindow events, I just want to destroy the additional pop up windows by any mouse click outside of the pop up widgets area. Is it possible or recommended via signal slot mechanism or eventFilter? Is it possible without dealing with (x,y) coordinates?
Thanks for the suggestions.