I am trying to implement a table widget which displays (real) numbers.
I want to display data in the table with lower precision (say, number
of digits after the decimal point is 2) without reducing the actual presicion of the referenced data.
I thought that I can store the rounded and not-rounded data separately as
DisplayRole and EditRole, respectively, but it turns out not true
as far as looking at the sources of QStandardItemModel::setData() and
QTableWidgetItem::setData().
Qt Code:
  1. void QStandardItem::setData(const QVariant &value, int role)
  2. {
  3. role = (role == Qt::EditRole) ? Qt::DisplayRole : role;
  4. .......
  5. }
To copy to clipboard, switch view to plain text mode 
Should I prepare another instance of StandardItemModel or my own container to store unrounded data?