Le 04/04/2014 10:41, Benjamin a écrit :
Why not, but this will not solve the issue :) I will probably fix that in the train today (5h long trip to Bordeaux ^^) .
I'm nice to give you something to do during those 5 hours, then ;)
The issue is that the items are sorted by default, which means that the list is populated with a copy of the items provided. Maybe it should not :)
Yes, I've seen that. It's fine by me that the list displayed in the widget is copied and sorted, just that I would have liked to be able to touch the true collection hidden inside the ListModel. Unless the list model is more like a ListAdaptor in meaning, in which cas I'll know that I have to build better objects around it.
But then, as that example shows, I then have problem connecting the drag and drop to the model.
Then for the convenient methods, I am not that sure :P But maybe it’s a good use case for traits :P
I'd say it depends what a ListModel is. Is this a model, in which case I'd like it to stand for the abstract collection inside and be able to add and remove items in it (and not use the trick of l1 items: l1 getItems), or is this just an adapter? If an adapter, then drag and drop is hard to implement.
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95