Hi. I want to use a QDockWidget in my QMainWindows application. I have a menu whose actions show the QDockWidget into the main GUI, when an action is checked, the wiget is shown and when it's unchecked the widget is hidden. I want to keep synchronization between the widget's visibility state and the check/uncheck action of the menu so that when an user clicks onto the QDockWidget's close button, the action is unchecked; but so far, I have not been able to find any signal fired by a QDockWidget in order to detect that is hiding its GUI, and so I can execute a slot that unchecks the action in the menu.

QDockedWidget::toogleViewAction () returns a pointer that I haven't been able to repoint to an uic generated action. Do I have to add this pointer to the menu manually? or is there any other way to avoid manually overwritting the uic generated code?.