title: eventFilter error in Qt
body: <pre><code>Widget::Widget(QWidget *parent)
  : QWidget(parent)
  , ui(new Ui::Widget)
  {
      ui-&gt;setupUi(this);
  
      installEventFilter(this);
  }
  
  bool Widget::eventFilter(QObject *target, QEvent *event)
  {
      if(target == this)
      {
          if(event-&gt;type() == QEvent::KeyPress)
          {
              QKeyEvent *keyEvent = static_cast&lt;QKeyEvent *&gt;(event);
              if(keyEvent-&gt;key()==QT::Key_Space)
              {
                  ui-&gt;label-&gt;setText("ok");
                  return true;
              }
              // 마우스 눌린 상태.
          }
      }
  
      return QWidget::eventFilter(target, event);
  }
  </code></pre>
  
  <p>Error information:</p>
  
  <blockquote>
    <p>invalid static_cast from type 'QEvent*' to type 'QKeyEvent*'</p>
    
    <p>invalid use of incomplete type 'struct QKeyEvent'</p>
    
    <p>forward declaration of 'struct QKeyEvent'</p>
  </blockquote>
  
  <p>What I want is :</p>
  
  <pre><code>label setText("ok")  keypress Event 'a' in Form
  </code></pre>