title: Show/Hide of QMenu
body: <p>I created the Start Menu by inheriting <code>QMenu</code>. I want to show and hide it using <code>QPropertyAnimation</code> in sliding style</p>
  
  <p><strong>Problem:</strong><br>
  Show &amp; hide are working fine when I call them explicitly(on click of start button). But when I click outside of start menu it hides instantly. Please suggest me what could be cause behind this:</p>
  
  <pre><code>My class is StartMenuUiClass which inherited from QMenu
  mptrobj_animation is QPropertyAnimation object
  
  void StartMenuUiClass::show()
  {
      this-&gt;raise();
      disconnect(mptrobj_animation,SIGNAL(finished()),this,SLOT(this_hide()));
      QMenu::show();
      mptrobj_animation-&gt;setDuration(500);
      mptrobj_animation-&gt;setStartValue(*mptrobj_startPosition);
      mptrobj_animation-&gt;setEndValue(*mptrobj_endPosition);
      mptrobj_animation-&gt;start();
  }
  
  void StartMenuUiClass::hide()
  {
      mptrobj_animation-&gt;setDuration(450);
      mptrobj_animation-&gt;setStartValue(*mptrobj_endPosition);
      mptrobj_animation-&gt;setEndValue(*mptrobj_startPosition);
      connect(mptrobj_animation,SIGNAL(finished()),this,SLOT(this_hide()));
      mptrobj_animation-&gt;start();
  }
  
  void StartMenuUiClass::this_hide()
  {
      this-&gt;lower();
      emit work_Done();
      QMenu::hide();
  }
  </code></pre>