Hello,
This code inserts records in a MySQL table:
int row = 0;
model->insertRows(row,1);
QModelIndex index
= model
->index
(row, model
->fieldIndex
("idPK"));
view->setCurrentIndex(index);
view->edit(index);
int row = 0;
model->insertRows(row,1);
QModelIndex index = model->index(row, model->fieldIndex("idPK"));
view->setCurrentIndex(index);
view->edit(index);
To copy to clipboard, switch view to plain text mode
If i repeat the the value in the Primary Key or leave NULL a mandatory field, the data will remain visible in the view but, as soon as i refresh the model, i realise it was not there.
How showld i control this?
Bookmarks