title: Flush mouse events to a disabled widget
body: <p>I have a Dialog with few buttons. When I disable the dialog, and I click on a child button, nothing happens. But as soon as I enable the Dialog again, the mouse event for the button is handled.</p>
  
  <p><strong>Does disabling a Dialog simply delays handling of any mouse events for its child widgets until enabled again?</strong> </p>
  
  <p>I tried installing event filters for child widgets when dialog is disabled and then removing the event filters when enabled again. But it provides the same behavior. As soon as dialog is enabled i.e. event filters for child widgets removed, the mouse event (when disabled) are handled.</p>
  
  <p>Can someone please help whats wrong here?</p>
  
  <pre><code>void MyDialog::changeEvent(QEvent *e)
  {
      if(e-&gt;type() == QEvent::EnabledChange)
      {
          if(isEnabled())
          {
              qDebug("Filters removed!\n");
              ui-&gt;pbtnOption1-&gt;removeEventFilter(this);
              ui-&gt;pbtnOption2-&gt;removeEventFilter(this);
              ui-&gt;pbtnOption3-&gt;removeEventFilter(this);
          }
          else
          {
              qDebug("Filters installed\n");
              ui-&gt;pbtnOption1-&gt;installEventFilter(this);
              ui-&gt;pbtnOption2-&gt;installEventFilter(this);
              ui-&gt;pbtnOption3-&gt;installEventFilter(this);
          }
      }
  }
  
  bool MyDialog::eventFilter(QObject *obj, QEvent *e)
  {
      if(obj == ui-&gt;pbtnOption1 || obj == ui-&gt;pbtnOption2 || obj == ui-&gt;pbtnOption3)
      {
          if(e-&gt;type() == QEvent::MouseButtonPress)
          {
              qDebug("MousePress Event!\n");
              return true;
          }
          else
              return false;
      }
      return QDialog::eventFilter(obj, e);
  }
  </code></pre>