[Qt-qml] QAbstractItemModel and setData / setProperty

Stephen Kelly steveire at gmail.com
Tue May 24 16:29:37 CEST 2011


vineeth wrote:

> Thanks a lot for pointing this out. I could directly declare a q_invokable
> method in the model data and get this working.

I recommend you don't put it in the model class itself. What happens if you 
decide you want sorting and add a proxy model? Add the new API to that too? 
That's why you should program to the interface (QAIM) not the 
implementation.




More information about the Qt-qml mailing list