PDA

View Full Version : QDockWidget is not getting closed if it is floating



mqt
26th November 2020, 08:27
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

d_stranz
27th November 2020, 16:25
You probably have a bug in your code. I have an app with a dock widget in a main window. If I float the dock widget, it doesn't matter how I close the main window (eg. from an Exit menu item that calls close() or a click on the "X" on the title bar), both windows close and the app exit.