Hello,

I am working with a QTableWidget the user will enter data into, but I cannot get the cells to become editable. Right now I'm doing the following:
Qt Code:
  1. void MyClass::initTable(){
  2. // Add Cell 1
  3. item->setFlags(item->flags() & ~Qt::ItemIsEditable);
  4. item->setData(Qt::DisplayRole, "(0,0)");
  5. tableWidget->setItem(0,0,item);
  6. // Add Cell 2
  7. item = new QTableWidgetItem;
  8. item->setFlags(item->flags() & ~Qt::ItemIsEditable);
  9. item->setData(Qt::DisplayRole, "(1,0)");
  10. tableWidget->setItem(1,0,item);
  11.  
  12. tableWidget->setEditTriggers(QAbstractItemView::AllEditTriggers);
  13. }
To copy to clipboard, switch view to plain text mode 

This is just an example, but it shows what I'm trying to do. I also have an Editor that's being applied to QColor objects that are inserted into the table. I don't know if that would change how it functions, but I figured it wouldn't hurt to mention. It's the Editor that's straight out of the Qt Tutorials.

Also, every other time I've tried to enter data into a table, it has worked. but not for this project. I don't know if it's the current version of Qt or what...

Thanks =)