If all the columns should be read-only only in this view, but not in other views of the same model) then try setting QAbstractItemView::NoEditTriggers with QAbstractItemView::setEditTriggers().
If some of the columns or cells in the model should be read-only in all views on the model then override QAbstractItemModel::flags() and remove the Qt::ItemIsEditable flag on relevant columns/rows/cells.
You could also write a proxy model that removes the relevant edit flags and use it for this this view only.
If some of the columns in the views should be read-only in this view, but read-write elsewhere, then you should look at setting a delegate on the column. If the delegate has a do-nothing (return 0) implementation of QAbstractItemDelegate::createEditor() then it will probably disable editing (I have not tested this).
Bookmarks