AFAIK, the flags are check "on use" so if you double click on an item which you just changed flags for not editable it should already take it into account.
You can check you model implementation with the QAbstractItemModelTester. See this wiki entry.
I'm sorry but I don't think will compile.
Please provide a minimal, compilable example which shows your problem. E.g
Sure it works, here my code for a bookmark tree:
Of course you need to create and return your custom data in mimeData () as well.
No one has replied
@SGaist Thanks for your advise, it works like well now.
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.