Quote Originally Posted by wysota View Post
Yes, reimplement QAbstractItemModel::flags() for your model and make sure ItemIsEditable is not returned for indexes from those columns.



Reimplement either QAbstractItemDelegate::createEditor() or QAbstractItemDelegate::setEditorData().
Hi Wysota,

Sorry to bug you, but I've been trying to use a QtreeView with checkboxes enclosed for each item with not much progress. I followed some thread in the forum and reimplement the flags method in my model class to include ItemIsUserCheckable. Now I can see the checkboxes appear next to each item in the tree. However, I cannot check or uncheck the checkboxes at all. I see some people advice that I should implement the setData() method in my model class but I have no clue on how to do that. Could you shed some light here?

Thanks a lot