title: QDataWidgetMapper autosubmit doesn't work
body: <p>I have created a sqldatabase and populate it with some test data. I'm using a QDataWidgetMapper and I think I've connected right because I can read the test records with this code:</p>
  
  <pre><code>    databaseManager = new DatabaseManager();
      dataMapper = new QDataWidgetMapper();
      dataMapper-&gt;setSubmitPolicy(QDataWidgetMapper::AutoSubmit);
      dataMapper-&gt;setModel(databaseManager-&gt;getTableModel());
  
      // aggiungo una riga nella tabella ui per ogni riga nel database
      for(int i=0; i&lt;databaseManager-&gt;getTableModel()-&gt;rowCount(); i++){
          this-&gt;addRow(); 
      }
     dataMapper-&gt;toFirst();
  </code></pre>
  
  <p>And here's the addRow() method (create rows in a QTableWidget and map them to the model):</p>
  
  <pre><code>int Widget::addRow(){
      int rowsNum = ui-&gt;moneyTableWidget-&gt;rowCount();
      ui-&gt;moneyTableWidget-&gt;insertRow(rowsNum);
      QLineEdit *newQLineEdit = new QLineEdit();
      QLineEdit *newItemLabel = new QLineEdit();
  
      QDoubleValidator *doubleValidator = new QDoubleValidator(0.0, 5.0, 2, this);
      newQLineEdit-&gt;setValidator(doubleValidator);
  
      QObject::connect(newQLineEdit, SIGNAL(textChanged(const QString &amp;)),
                       this, SLOT(updateTotal()));
      ui-&gt;moneyTableWidget-&gt;setCellWidget(rowsNum, 0, newItemLabel);
      ui-&gt;moneyTableWidget-&gt;setCellWidget(rowsNum, 1, newQLineEdit);
         dataMapper-&gt;addMapping(newQLineEdit,databaseManager-&gt;getTableModel()-&gt;fieldIndex("price"), "text");
      dataMapper-&gt;addMapping(newItemLabel,databaseManager-&gt;getTableModel()-&gt;fieldIndex("item"), "text");
  
      return rowsNum;
  }
  </code></pre>
  
  <p>the problem is that autosubmit doesn't work. If I add rows to the QtableWidget (with the same addRow method) or if I modify/delete existing rows (the ones with test data) nothing happens. </p>
  
  <p>Or better the gui reflects the changes, but re-runnig the application I've got the same test date that I had before.</p>
  
  <p>Any idea? Is there a way to test what is happening to the database? If it were an usual query q I would do a q.lastError(). </p>
  
  <p>thanks</p>