I found the solution to my problem. To get the index of "GrupaId" after setting the relation in line4 I need to refer to "GrupaName" like this:
int r = model->fieldIndex("GrupaName");
I found the solution to my problem. To get the index of "GrupaId" after setting the relation in line4 I need to refer to "GrupaName" like this:
int r = model->fieldIndex("GrupaName");
Bookmarks