I have a QTableView
with 4 Rows and 4 columns each representing their data's in it. By default the QTableView
is editable. Now I want to make any particular column as non editable in my QTableView
.
How can I do it?
Thanks in Advance.
You can use the setItemDelegateForColumn()
function. Implement a read-only delegate, and set it for the column you need.
You can also use the flags inside your model, and remove the Qt::ItemIsEditable
flag for a specific column.