int curRow = ui->tableView->currentIndex().row(); //获取选中的行
if(!model->removeRow(curRow)) qDebug()<<"Remove Line Failed"; //删除该行
if (model->submitAll())
{
model->database().commit(); //提交
}
else
{
model->revertAll();
qDebug()<<model->lastError().text();
}
在开发板中总是删除不了,removeRow返回成功,submitAll总是返回false,model->lastError().text()的值为“Parameter count mismatch”