\qt\examples\itemviews\addressbook\

You'll notice the data is stored in a QList<QPair<QString,QString>>, so the data can be referenced directly without using the data method of the model.

For example, to receive both columns for any appropriate row you would do the following:
Qt Code:
  1. QPair<QString, QString> pair = model.listOfPairs.at(index.row());
To copy to clipboard, switch view to plain text mode 
Assuming listOfParis was public of course (you would probably prefer to have a method for accessing it that returned a type such as QPair<QString, QString> type)

And of course, you would have a custom structured data storage object, not QPair, but probably still in a QList<>