Could somebody help me?
I have build a model based on QAbstractListModel with such inner structure:

Qt Code:
  1. QList <QPair<QString,QPair<QImage,QPair<QStringList,QStringList> > > > mainMap;
To copy to clipboard, switch view to plain text mode 

in data method of this model, I describe:

Qt Code:
  1. QVariant MainModel::data(const QModelIndex &index, int role) const
  2. {
  3. if (!index.isValid()) return QVariant();
  4. if (!index.row() >= mainMap.size()) return QVariant();
  5. if (role == Qt::DisplayRole) return mainMap.at(index.row());
  6. else return QVariant();
  7. }
To copy to clipboard, switch view to plain text mode 

In which method view (based on QAbstractItemView or QAbstractListView) I need to state what data from mainMap I need to use in order to show in view (for example, I need to show mainMap.at(index.row()).first in the first list, and mainMap.at(index.row()).second.second.first) in the second one)?