CREATE TABLE my_item_names ( id INT, "Имя" TEXT );CREATE TABLE my_item_names_2 ( id INT, name TEXT );иCREATE TABLE my_item_view ( id INT, name_id INT);
QTableView * view = new QTableView;view->setItemDelegate(new QSqlRelationalDelegate(view));QSqlRelationalTableModel * model = new QSqlRelationalTableModel;model->setTable( "my_item_view" );model->setRelation( 1, QSqlRelation( "my_item_names", "id", "Имя" ) );view->setModel( model );view->show();
model->setRelation( 1, QSqlRelation( "my_item_names_2", "id", "name" ) );
QSqlRecord QPSQLResult::record() const... for (int i = 0; i < count; ++i) { QSqlField f; if (d->driver->isUtf8) f.setName(QString::fromUtf8(PQfname(d->result, i))); else f.setName(QString::fromLocal8Bit(PQfname(d->result, i)));...
class QPSQLDriverPrivate{public: QPSQLDriverPrivate(): connection(0), isUtf8(false), pro(QPSQLDriver::Version6) {}...