title: The KeyPressEvent don't work
body: <p>I have a problem with the <code>KeyPressEvent</code>, I need to move a <code>QGraphicsItem</code> player in my scene, but the program does not use the function <code>KeyPressEvent</code> of class <code>game</code></p>
  
  <p>File "game.h":</p>
  
  <pre><code>#ifndef GAME_H
  #define GAME_H
  #include &lt;QLayout&gt;
  #include &lt;QTimer&gt;
  #include &lt;QGraphicsView&gt;
  #include &lt;QAction&gt;
  #include &lt;QString&gt;
  #include &lt;QLabel&gt;
  #include &lt;QKeyEvent&gt;
  #include &lt;QGraphicsItem&gt;
  #include &lt;strutturaAlieni.h&gt;
  #include &lt;naveGiocatore.h&gt;
  #include &lt;laser.h&gt;
  #include &lt;QWidget&gt;
  
  namespace Ui {
  class game;
  }
  
  class game : public QWidget
  {
      Q_OBJECT
  
  public:
      explicit game(QWidget *parent = 0);
      ~game();
  
      virtual void keyPressEvent(QKeyEvent *);
  }
  </code></pre>
  
  <p>and the cpp source</p>
  
  <pre><code>void game::keyPressEvent(QKeyEvent *e){
  switch(e-&gt;key())
  {
  
      case Qt::Key_Left :{
                  this-&gt;player-&gt;moveBy(-5,0);
      break;
      }
      case Qt::Key_Right :{
                  this-&gt;player-&gt;moveBy(5,0);
      break;
      }
    }
   this-&gt;player-&gt;update();
  }
  </code></pre>
  
  <p>and in the  mainwindow.cpp I click the play button that executes this code:</p>
  
  <pre><code>void MainWindow::on_Play_clicked()
  {
      game *Gioco=new game;
      Gioco-&gt;show();
      Gioco-&gt;move(300,0);
   }
  </code></pre>
  
  <p>Why doesn't the <code>keyPressEvent</code> start?</p>