I have a simple QStandardItem and QTableView and QStyledItemDelegate. They have delegates , I would like to disable the possibility for user to change the content of a column in the table, and allow only select and copy. I guess it related to QStyledItemDelegate::createEditor
.
When I set it to return 0, it just disable everything.
QWidget *InfoTableItemDelegate::createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
// return QStyledItemDelegate::createEditor(parent, option, index);
return 0;
}
my question is , how can i defined it so i can only select and copy , and disable the option to edit it like delete or change the text