title: Data Entry to Table with Entry key issue
body: <p>I have created student data entry dialog using PyQt5 QTableWidget, QLineEdit, QComboBox.</p>
  <p>Here is the PyQt5 code</p>
  <pre><code>import sys
  from PyQt5.QtWidgets import (QDialog,
                                 QApplication,
                                 QGridLayout,
                                 QPushButton,
                                 QLabel,
                                 QLineEdit,
                                 QComboBox,
                                 QTableWidget,
                                 QTableWidgetItem,
                                 QAbstractItemView)
  from PyQt5.QtCore import Qt
  
  class MyWindow(QDialog):
      def __init__(self):
          super().__init__()
  
          self.setWindowTitle('Student Data Entry')
  
          grdLayout = QGridLayout()           
  
          self.lblStudentId = QLabel('Student Id')
          self.cboStudentId = QComboBox(self)
          self.cboStudentId.addItems(['1000','6001','5000','5002','9000','1004'])
          self.cboStudentId.setCurrentIndex(1)
  
          self.lblStudentName = QLabel('Student name',self)
          self.ledStudentName = QLineEdit(self)
          
          self.lblAge = QLabel('Age',self)
          self.ledAge = QLineEdit(self)
          self.ledAge.setAlignment(Qt.AlignCenter) 
          self.ledAge.setPlaceholderText('0')
  
          self.lblAdd = QLabel('Add',self)
          self.btnAdd = QPushButton('Add',self)
          self.btnAdd.clicked.connect(self.addFeeRow)        
  
          # student data table
          self.tblStudent = QTableWidget(self)
          self.tblStudent.setColumnCount(3)
          self.tblStudent.setShowGrid(True)
          self.tblStudent.setHorizontalHeaderLabels(('Student Id', 'Student name','Age'))
          self.tblStudent.verticalHeader().hide()
          self.tblStudent.setEditTriggers(QTableWidget.NoEditTriggers)
          self.tblStudent.setSelectionBehavior(QAbstractItemView.SelectRows) 
          self.tblStudent.setColumnWidth(0, 50)
          self.tblStudent.setColumnWidth(1, 150)
          self.tblStudent.setColumnWidth(2, 25)         
  
          # Add Label, LineEdit and ComboBox
          grdLayout.addWidget(self.lblStudentId,0,0)
          grdLayout.addWidget(self.lblStudentName,0,1,1,2)
          grdLayout.addWidget(self.lblAge,0,3)
          grdLayout.addWidget(self.lblAdd,0,4)
  
          grdLayout.addWidget(self.cboStudentId,1,0)
          grdLayout.addWidget(self.ledStudentName,1,1,1,2)
          grdLayout.addWidget(self.ledAge,1,3)
          grdLayout.addWidget(self.btnAdd,1,4)
          
          # Add table
          grdLayout.addWidget(self.tblStudent,2,0,1,4)
  
          grdLayout.setColumnStretch(0,1)
          grdLayout.setColumnStretch(1,1)
          grdLayout.setColumnStretch(2,1)    
  
          self.setLayout(grdLayout)
          
      def addFeeRow(self):
          rowCount = self.tblStudent.rowCount()
          self.tblStudent.insertRow(rowCount)
          # insert into table
          self.tblStudent.setItem(rowCount,0, QTableWidgetItem(self.cboStudentId.currentText()))
          self.tblStudent.setItem(rowCount,1, QTableWidgetItem(self.ledStudentName.text()))
          self.tblStudent.setItem(rowCount,2, QTableWidgetItem(self.ledAge.text()))
         
  if __name__ == '__main__':
      app = QApplication()
      window = MyWindow()
      window.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/X8bZF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X8bZF.jpg" alt="enter image description here" /></a></p>
  <p>My requirements are,</p>
  <ol>
  <li><p>when user clicks <strong>Add</strong> QPushButton or Press Enter key when <strong>Age</strong> QLineEdit is focused, Data (student id, student name, and student age) should be entered into table. Data should be entered into the table when user presses Enter key in Age QLineEdit or Add QPushButton.</p>
  </li>
  <li><p>Also when user press <strong>Enter key</strong> in <strong>Student Id</strong> QComboBox, focus should move to <strong>next widget (Student Name)</strong>. When user presses <strong>Enter key</strong> in <strong>Student Name</strong> QLineEdit, focus should move to <strong>next widget (Student Age)</strong></p>
  </li>
  </ol>
  <p><strong>In the current scenario</strong>, when user presses Enter Key in any widgets like student id, student name, Data is entering into table, which I don't want. <strong>Please provide the solution to restrict this behaviour.</strong></p>