I have a QMainWindow and added QDockWidget to it. Even after closing the main window, the dock widgets which are floating is not no getting closed. I was assuming all children will be automatically closed. Does the parent of QDockWidget changes when is floating? Any way to make it close even if it is floating. Thanks in advance