title: How to know whether QTableWidget's cell is (not) being edited?
body: <p>I have an <code>QTableWidget</code> with limited rows. I'd like let users to press RETURN to insert a row, if they press RETURN at the last row and no cell is being edited (double click the mouse to enter the editing mode).</p>
  
  <p>Cell is not being edited:</p>
  
  <p><a href="https://i.stack.imgur.com/DtBTC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DtBTC.jpg" alt="enter image description here"></a></p>
  
  <p>The code is like this, I don't know how to fillin [current cell is not being edited]:</p>
  
  <pre><code>class MyTable(QTableWidget):
      def KeyPressReturn(self, event):
          if event.key() == Qt.Key_Return:
              if .currentRow() is the last row] and [current cell is not being edited]:
                  insertRow(last_row_number)
  </code></pre>