Quote Originally Posted by shamas View Post
So as it turns out that to choose which of my columns in which rows needed to be click-able/editable, I could do that by setData(columnNumber, Qt.UserRole, "isDisabled") and using QtItemDelegate for QtreeWidget's setItemDelegate. Each time a certain box is double clicked, I can see if its data has userRole defined is "isDisabled" in which case it would return null.
There is an easier way. Each item in the model has a set of flags returned by QAbstractItemModel::flags(). Those flags include Qt::ItemIsEditable and Qt::ItemIsEnabled.