It is a good idea to test also with a QListView...

I found that the behavior is a little different.
From QML the flags function never called. In the data function the role is just the roles I have defined with setRoleNames call.

If I use a form with QListView flags is called many times, and role is DisplayRole, and others, so I had to extend the model, to implement the displayrole also.

But from QML, the answer is always: Cannot assign to read-only property 'title'

Any other idea?

Maybe I should use the solution with calling the slots...