Hello!

I am writing a class to import *.csv files that contain customer related data.

So far I write the data to a QStandardItemModel. The data type (first name, last name, city,...) is used as its headerData. Now I want to add the data to a QSqlTableModel.

Is it possible to access the data in a QStandardModel through its headerData? Something similar to QStringList's

Qt Code:
  1. QStringList::indexOf("Street")
To copy to clipboard, switch view to plain text mode 

to write a nice QSqlQuery like

Qt Code:
  1. query.bindValue(":Street", model->data(model->index(row, indexOf("Street"))));
To copy to clipboard, switch view to plain text mode 

Kind regards,
HomeR