QSortFilterProxyModel: retrieve the item or index of the original model
<p>I happen to have a ComboBox, and a QSortFilterProxyModel attached to it that orders the items alphabetically.</p>

<p>The Original model (QComboBox) is for example:</p>

<p>"C",
"A",
"D",
"B"</p>

<p>The sorted model (QSortFilterProxyModel) becomes:</p>

<p>"A",
"B",
"C",
"D"</p>

<p>If I now select "D" within the sorted comboBox, the signal QComboBox::currentIndexChanged(int) gives me index=3, but I would like to retrieve the index relative to the Original Model possibly, so index=2.</p>

<p>On the other hand I would also like to "Original Model"->setCurrentIndex(idx). But if if I define idx=2, in the comboBox the highlighted row shows "C", as the view is sorted.</p>

<p>How do I solve this?</p>