title: How I catch Python PyQt5 QTreeWidget pressing enter (return) key?
body: <p>I am trying to run <code>enterFunc()</code> when pressing enter (return) key. But not working. Here is the code and what is the true code?:</p>
  
  <pre><code>class myForm(QMainWindow):
  
      ...
      def keyPressEvent(self,event):
                      if(event.key()==Qt.Key_Enter):
                          enterFunc()
      ...
      myForm.myTreeWidget.keyPressEvent(self,event)
      ...
  </code></pre>