title: Qt QWidget hide animation
body: <p>I have a sub-class of <code>QWidget</code> that is a popup widget. I would like to add some animation when it shows and disappears. So I re-implemented <code>showEvent(QShowEvent * event)</code> and <code>hideEvent</code> and added some <code>QPropertyAnimation</code> in the functions. The <code>showEvent</code> works just fine for me but the <code>hideEvent</code> doesn't. Because </p>
  
  <blockquote>
    <p>Hide events are sent to widgets immediately after they have been hidden.</p>
  </blockquote>
  
  <p>Any idea about how to do it?</p>
  
  <p>Update:</p>
  
  <p>I don't think it's the right reason. When I use Nejat's solution. The show part works. But when I click outside the widget. It disappears immediately.  </p>