Hello!

I have a QStabdardItemModel and I need to clear the data of one cell but dont remove the row

I am trying this but its not working

Qt Code:
  1. modeloLancamentosAmortizacao->data(modeloLancamentosAmortizacao->index(0,2)).clear();
To copy to clipboard, switch view to plain text mode 

this way does not work either

Qt Code:
  1. QStandardItem *item = modeloLancamentosAmortizacao->item(0,2);
  2. item->data().clear();
To copy to clipboard, switch view to plain text mode 

How can I do that?

Thanks