Hi wysota,
I've got it.
For me, your :"// for generic models:" is better, for accessing the ID of the person.
Still the code is not optimized, it is working. ;)
It is inside the person.cpp file.
void Person::on_OkButton_clicked()
{
qWarning( "on_OkButton_clicked : begin" );
QAbstractItemModel *aim = PersonTableView->model();
QModelIndex mi = PersonTableView->currentIndex();
qDebug() << "Person::on_OkButton_clicked() : mi.row()=" << mi.row() ;
int i = aim->data(mi.sibling(mi.row(), 0)).toInt();
qDebug() << "Person::on_OkButton_clicked() : i=" << i ;
PersonIdSet(aim->data(mi.sibling(mi.row(), 0)).toInt());
PersonDetail *mw = new PersonDetail;
mw->show();
qWarning( "on_OkButton_clicked : end" );
}
So on the PersonDetail, I can manage only one record.
Once again, thank you very much.
Regards.
Bookmarks