QSqlRelationalTableModel *model = QSqlRelationalTableModel ();model->select();model->setTable("Clients");model->setRelation(0, QSqlRelation("Servers", "ID", "Name"));
qDebug() << model->data(model->index(row,0)).toString();
// То есть я меняю строчкуqDebug() << model->data(model->index(row,0)).toString();// на две строчкиQSqlTableModel * modelColumn = model->relationModel(0);qDebug() << modelColumn->data(modelColumn->index(row,0)).toString();
C++ (Qt)QSqlQuery q = QSqlQuery(DB);q.exec("SELECT ServerID FROM Clients ORDER BY ServerID ASC");
C++ (Qt)q.seek(i, false);qDebug() << q.value(0).toInt();