Hi,I'm not sure I have well understood what you mean... If you use the model/view framework you can do what you want by modifing the data() function of you model.
Inside the data function you can do something like this (I write a pseudocode concerning the vectors only):
if (role == Qt::DisplayRole)
return vector.mean();
if(| role == Qt::EditRole)
for(int i=0;i<vector.size();i++)
values
+=QString::number(vector
[i
],...
)+",";
return values;
if (role == Qt::DisplayRole)
return vector.mean();
if(| role == Qt::EditRole)
QString values;
for(int i=0;i<vector.size();i++)
values+=QString::number(vector[i],...)+",";
return values;
To copy to clipboard, switch view to plain text mode
In this way you obtain the mean when you show the object and you obtain the singles values when you try to edit it.
Bookmarks