title: Show/hide QDockWidget?
body: <p>I have a dock widget, now I want to add a "Window" menu to show/hide the widget. Easy enough to do with</p>
  
  <pre><code>showPropWinAct = new QAction(tr("&amp;Properties"), this);
  showPropWinAct-&gt;setStatusTip(tr("Show properties window"));
  showPropWinAct-&gt;setCheckable(true);
  connect(showPropWinAct, SIGNAL(toggled(bool)), propertiesWindow, SLOT(setVisible(bool)));
  </code></pre>
  
  <p>The problem is when the user clicks the [x] on the widget, the <code>showPropWinAct</code> doesn't get toggled. How can I listen for this event, and toggle the action properly, without firing off a 2nd setVisible signal (one from the close event presumably, and one from the <code>connect</code> above)?</p>