title: Qt Key Pressevent Enter
body: <pre><code>void LoginModle::keyPressEvent(QKeyEvent *event)
  {
      qDebug() &lt;&lt; event-&gt;key() &lt;&lt; "\t" &lt;&lt; Qt::Key_Enter &lt;&lt; "\t" &lt;&lt; QKeyEvent::Enter;
      if( event-&gt;key() == Qt::Key_Enter)
          OKButtonClicked();
      else
          QDialog::keyPressEvent(event);
  }
  </code></pre>
  
  <p>This code is very simple, class <code>LoginModle</code> inherits from <code>QWidget</code>. run this code and when I press <kbd>Enter</kbd>, it shows:</p>
  
  <pre><code>16777220     16777221    10
  </code></pre>
  
  <p>It means that my <kbd>Enter</kbd> in keyboard is <code>16777220</code>, but in Qt, it was defined as <code>16777221</code>.</p>
  
  <p>My system is Elementary OS (Freya), which is based on Ubuntu 14.04.</p>
  
  <p>Is there something wrong with my driver or just the program's mistake ?</p>