foreach(QModelIndex index, indexes){ if(index.isValid()){ QString text = data(index,Qt::DisplayRole).toString(); stream << text; } }
for (int i = 0 ; i < columnCount(); i++) { QString text = data(createIndex(indexes[0].row(),i),Qt::DisplayRole).toString(); stream << text; }