Add this
Qt Code:
  1. int EsxModel::ContentModel::rowCount(const QModelIndex &parent) const
  2. {
  3. if(parent.isValid())
  4. return 0;
  5.  
  6. return mFiles.size();
  7. }
To copy to clipboard, switch view to plain text mode 

also do the corresponding changes in parent() and index()