qMRMLSubjectHierarchyTreeView Makes a column uneditable

I created an extension, I want to make nameColumn uneditable, how should i do

You can use standard Qt API to make items non-editable. Maybe you can try clearing the Qt::ItemIsEditable flag in the tree view item.

thanks, I rewrote the qMRMLSubjectHierarchyModel: : subjectHierarchyItemFlags method implements this function, but I don’t know where the model set to the treeview is correct

It looks good. Just to improve style and readability, I would add handle the editable flag in a separate if branch.