Does it work if you change your flags() method to:
Qt Code:
  1. Qt::ItemFlags GDOSGrassModel::flags(const QModelIndex &index) const
  2. {
  3. return QAbstractItemModel::flags( index );
  4. }
To copy to clipboard, switch view to plain text mode 
?