Sorry to ask but I am unsure how to use qDebug to check for errors in the model (what member should I use?)

Not sure if this will help but here is the code for the view and the model:

Qt Code:
  1. //Note: "medadmin" is the name of the table in the SQLite3 database
  2. model->setTable ("medadmin");
  3. model->select();
  4. qDebug << model->error();
  5.  
  6. //The following lines edit a couple of parameters in the table view "View" and bind it to the model
  7. ui->View->setWindowTitle ("Patients List");
  8. ui->View->setModel (model);
  9. ui->View->setSelectionBehavior (QAbstractItemView::SelectRows);
  10. ui->View->resizeColumnsToContents();
  11. ui->View->setSelectionMode (QTableView::SingleSelection);
  12. ui->View->setVisible (true);
  13. ui->View->setColumnHidden(0, true);
To copy to clipboard, switch view to plain text mode