For me, a list should just hold ‘dumb’ items where the kinds of actions you can do are limited to e.g. a simple context menu. Otherwise if you need complex actions or multiple nested widgets et cetera, the ListModel implementation and API will become too complicated.
I instead think that what you want is something that should be taken care of by dynamic spec: (1) you make a ComposableModel subclass that holds all the widgets for one item of your list, (2) you make your own ‘list widget’ that uses dynamic spec to dynamically add/remove instances of (1) in a one column layout. Note that I have never tried this. As far as I understand, this should mostly work. When there will be a need for a vertical scrollbar I don’t think it will appear. If this is the case, dynamic spec should be extended with this support. I think that in general, dynamic spec and layouting of widgets could benefit of some work. But this is a complex topic and I do not have the time to tackle it, sadly. > On Mar 2, 2016, at 17:44, Julien Delplanque <jul...@tamere.eu> wrote: > > This: [1] is what I would like to do. > I found it in an old thread: [2] but it is a prototype. I wondered if there > was an object able to do it in the framework :-)... > > Julien > > Links: > [1]: http://ijintek.fr/wiki/doku.php?id=spec_examples#listview_example > [2]: http://forum.world.st/Spec-question-td4741608.html#a4747231 > > On 02/03/16 21:31, Johan Fabry wrote: >> I never tried anything like this, I do not think it is possible. >> >> What you are trying to do seems strange to me, what is the use case you want >> to implement? >> >>> On Mar 2, 2016, at 17:06, Julien Delplanque <jul...@tamere.eu> wrote: >>> >>> Hi everyone, >>> >>> I can't find how to display Spec widgets in a ListModel, is it possible? >>> >>> I would like to have a list model holding, at each row, a TextModel and a >>> ButtonModel. >>> >>> Thanks in advance, >>> >>> Julien >>> >>> >> >> >> ---> Save our in-boxes! http://emailcharter.org <--- >> >> Johan Fabry - http://pleiad.cl/~jfabry >> PLEIAD and RyCh labs - Computer Science Department (DCC) - University of >> Chile >> >> > > > ---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile