What do you mean about the edit() thing? You don't need to touch edit in any way. You just call setData() with Qt::CheckStateRole on the model for each index and that's it.