Ok, you have a Q<Menu>Action, Q<Toolbar>Action and the QDockWidget. Only connect the Q<Menu>Action to the QDockWidget. (toogle -> setVisible). and then connect the Q<Menu>Action with the Q<Toolbar>Action (toggled -> setChecked) and vice versa.

Or use QDockWidget::toggleViewAction() direct as an action in your menu.

Lykurg