You can control it with QAbstractItemModel::flags(). Only items that have Qt::ItemIsEditable flag set are editable.