title: Unable to Ignore maximize event from taskbar menu
body: <p>Working on Linux Centos and my task is to ignore the maximize button event from taskbar menu for my application. Basically I dont want my application to be maximize. 
  So i implemented QDialog::changeEvent(QEvent*) &amp; EventFilter in hopes of being able to ignore the appropriate events as they come in:</p>
  
  <pre><code>void MyDialog::changeEvent(QEvent* event)
  {
    if (event-&gt;type() == QEvent::WindowStateChange)
    {
      cout &lt;&lt; "window state change event! window state:" &lt;&lt; windowState() &lt;&lt; endl;
      //should i perhaps do event-&gt;accept() or event-&gt;ignore() here?
    }
    else
    {
      QDialog::changeEvent(event);
    }
  }    
  
  bool MyDialog::eventFilter(Qobject *object, QEvent* event)
  {
      if(event-&gt;type() == QEvent::WindowStateChange &amp;&amp; isMaximized() )
      {
        event-&gt;ignore();          
        return truel;
      }
  
      return QDialog::eventFilter(object, event);
  }
  </code></pre>
  
  <p>Unfortunately, this doesn't work either. The events are still getting through and the window is still being maximized. is there some way, any way, of solving this problem!?</p>
  
  <p>thanks in advance!</p>