nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.54k stars 131 forks source link

how can I get my "listview" container's items be displayed in a recycleview fashion? #379

Open K3nn3th2 opened 5 years ago

K3nn3th2 commented 5 years ago

As stated, I'm thinking if how to get my listview containers items to be displayed in a recycleview fashion.

My program runs fine when I don't have too many objects in my containers Include.objects list but when it gets crowded the program crashes.

Would I have to use a rawwidget to use a qlistview object? (Which seemingly would support the recycle approach)

MatthieuDartiailh commented 5 years ago

Could you clarify what you mean by recycle approach ? Also could you post the traceback of the crash and a minimal reproduction example.

K3nn3th2 commented 5 years ago

I am thinking of a view like kiwi's Recycleview, which uses a memory efficient approach to display the child widgets.

Or is this already the case in enaml?

When I have a lot of the listitems in the container mentioned here the program runs until I scroll rapidly through the list, then crashes. It only happens when the list is large.

MatthieuDartiailh commented 5 years ago

No it is not the case in enaml. First, because it does not make sense in an Include that can receive arbitrary widgets. It could be interesting in a Looper but I am not sure how we would do that without tying it to the backend.

K3nn3th2 commented 5 years ago

Thanks for the reply! Do you suggest wrapping a QListWidget via a RawWidget? My "ListItems" would have to be QListItems then , am I seeing this correctly?