Hello Friends,

I am porting my application that was in Qt3 for Qt4.

Good, it would like to take off a doubt, I I used the QDataTable in the Qt3, now
I am using the QTableView with the QSqlQueryModel.

I had the following code before.

=Qt3 part code===========================
...
QString sql = QString("SQL OF 130 LINES").arg(idGlobal);

QSqlSelectCursor *cur = new QSqlSelectCursor(sql);

dataTable->addColumn("id_1", tr("Nº"), 70);
dataTable->addColumn("id_2", tr("Test"), 30);
...
=Qt3 end code============================

Now in the Qt4 I am making thus:

=Qt4 part code===========================
...
QSqlQueryModel *model = new QSqlQueryModel(this->tableView);
model->setQuery(QString("O SQL GRANDE").arg( globalIdentID ));

model->setHeaderData(0, Qt::Horizontal, QObject::tr("Nº"))
model->setHeaderData(0, Qt::Horizontal, QObject::tr("Nº"))
...
=Qt4 end code============================

This functions, more the doubt is, as I make to only bring fields that I desire, eat I I made before when I added the column in the QDataTable. Therefore this SQL returns a mount from thing, more I wants only determined fields, thus making it brings everything in the screen.

Somebody knows as can make this?

edm.