title: Qt respond to keyPressEvent in child QWidget
body: <p>I have a QWidget derived class as such:</p>
  
  <pre><code>class tetris_canvas : public QWidget
  {
      Q_OBJECT
  
  public:
      tetris_canvas(QWidget * parent = 0);
      ~tetris_canvas();
  
  protected:
      void paintEvent(QPaintEvent *event);
      void keyPressEvent(QKeyEvent *event);
  };
  
  //Never hits this keyPressEvent!!!
  void tetris_canvas::keyPressEvent(QKeyEvent * event)
  {
      if (event-&gt;key() == Qt::Key_Down)
      {
          rect-&gt;moveBottom(20);
          update();
      }
  }
  </code></pre>
  
  <p>Then I have my main_window class:</p>
  
  <pre><code>class main_window : public QWidget
  {
      Q_OBJECT
  
  public:
      main_window(QWidget* parent = 0, Qt::WFlags flags = 0);
      ~main_window();
  
  protected:
      void keyPressEvent(QKeyEvent * event);
  };
  
  //This keyPressEvent is hit!
  void main_window::keyPressEvent(QKeyEvent* event)
  {
      if (event-&gt;key() == Qt::Key_Escape)
      {
          QApplication::exit(0);
      }
      QWidget::keyPressEvent(event);
  }
  </code></pre>
  
  <p>My question is, how do I get the <code>keyPressEvent</code> in my <code>tetris_canvas</code> widget to respond to a key press? </p>
  
  <p>I am drawing inside that canvas and I need to respond to keypresses so the user can interact with things on that canvas.</p>
  
  <p>The widget is added to a <code>QGridLayout</code> in the ctor or my <code>main_window</code> class. </p>