Hi,

I'm using an QAbstractItemModel to display data on a QML TreeView. I have a list of items for a particular column in the table.

I have saved those items in a QVariantList. Is it possible to display this on the UI as a ListView?

Qt Code:
  1. QVariant DiffModel::data(const QModelIndex &index, int role) const
  2. {
  3. if (!index.isValid())
  4. return QVariant();
  5.  
  6. DiffInfo* item = getItem(index);
  7.  
  8. switch (role)
  9. {
  10. case ColumnRole:
  11. return item->rightColumn();//Return a QVariantList
  12. }
  13. return QVariant();
  14. }
To copy to clipboard, switch view to plain text mode 

Kindly advice