I'm using QTableWidget as view widget and QTableWidgetItem as items. How to enable editing for specific QTableWidgetItem cells?
+1
A:
Assuming that the QTableWidget is enabled, you just set the correct flags on the QTableWidgetItem.
Qt::ItemFlags flags = item->flags();
flags = bEnable ? flags | Qt::ItemIsEditable : flags & ~Qt::ItemIsEditable;
item->setFlags(flags);
David Walthall
2010-04-06 22:47:16