Hello,

I have a model that manages a list of files. It's viewed by two widgets (a combobox and a tableview). Each widget has it's own QSortFilterProxy to pick which files it's supposed to display.

The problem I'm encountering is related to drag and drop operations. After I perform a drag and drop (reordering list items), I've had trouble updating the views. For some reason, neither proxy model responds to the source model's dataChanged() signal (which I emit in the source model's setData() function, as well as the removeRows() function which is called last in the drag-drop operation). Anyway, I can solve the tableview refresh problem easily enough by adding a call to reset() in a slot in it's proxymodel, but the combo box is proving more difficult.

I can't use the reset() trick with the combobox's proxy model because it will reset the current index to -1, losing whatever item has been selected.

This leaves me with two possible solutions. Either I need to make a connection which ensures a proxy model is always synced with changes in it's source, or I need to save the current index of the combo box before the model is changed, then restore that index after the change is made. On the latter technique, I'm not sure how I can do that, nor am I certain that the view would update if I updated it's proxy model programmatically...

Any help would be much appreciated...