[Qt-interest] Drag and drop in QTreeView - reordering rows

Nesbitt none at none.no
Mon Oct 18 00:51:20 CEST 2010


piątek, 15 października 2010 20:14 - BRM

> I haven't done Tree Models and such, but I know when I worked with the
> List View stuff for something similar I had to be very careful what
> order I applied the changes in
> since once I modified an index later indexes would no longer be valid -
> e.g. remove row X then row X+1 becomes X but references in the range
> selection spec still have X+1.
> Perhaps I was doing it differently than I should have (that was early on
> in my Qt experience) so may be there is a way to avoid that.
> 

Thanks but I think this is handled by beginMoveRows/endMoveRows. My 
problem is that I cannot just move rows using drag and drop. Rows are 
reparented or replaced.






More information about the Qt-interest-old mailing list