Ok you have to do something in the for cycle:
for (int row = 0; row < numRows; row++) {
table->setCurrentIndex(index);
"Do something here for the query"
}
for (int row = 0; row < numRows; row++) {
const QModelIndex index = model->index(row, 1);
table->setCurrentIndex(index);
"Do something here for the query"
}
To copy to clipboard, switch view to plain text mode
and run your SQL command once you are in the needed index, you can put an if clause here to know if it is the record you want to delete and also use index.data(). Hope this helps
Bookmarks