Hello,


I’ve done some reading and can’t find anything on non-contiguous selection
of items in item views beyond :



“Selections are made up of *selection ranges*. These efficiently maintain
information about large selections of items by recording only the starting
and ending model indexes for each range of selected items. Non-contiguous
selections of items are constructed by using more than one selection range
to describe the selection.” -
http://doc.trolltech.com/4.6/model-view-selection.html#concepts



Currently we have implemented a selection of items by scanning each row in
the model to see if it should be “selected” based on certain criteria.  Is
there a faster way to do this as looping in Python through a large (50,000
rows)?  When selections can be specified with selection ranges the selection
is fast.  However, our worst case scenario is that every-other item need be
selected: 25,000 selection ranges would be created and then we would just be
looping through everything again anyways.



Any ideas?



Thanks,

Darryl
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to