Here is what the Qt5 code looks like at this time.

Qt Code:
  1. int rowcount = recipeTable.rowCount();
  2. qDebug () << "recipe select returned " << rowcount << " rows";
  3.  
  4. QSqlRecord recRecipe = recipeTable.record(0);
  5. if (!recRecipe.isEmpty()) // backwards way to say record exists
  6. {
  7. // if we get this far, it's an update
  8. recRecipe.setValue("isactive",false);
  9. // recipeUpTable.setData(recipeUpTable.index(0,2), false);
  10. bool boolRecSubmit = recipeTable.submitAll(); // and update the existing record
  11.  
  12. qDebug () << "value for isactive is " << recRecipe.value("isactive");
  13. qDebug () << "updating recipe returned " << boolRecSubmit;
  14. qDebug () << "updating recipe record to not active " <<recipeTable.lastError().text();
To copy to clipboard, switch view to plain text mode 

Application Output ...
recipe select returned 1 rows
value for isactive is QVariant(bool, false)
updating recipe returned true
updating recipe record to not active " "

Somehow the change is not reflected in the database table.

2ActiveRecipes.png

The first row should have isactive false.