I have a model/view where the code searches for the value in a field.

The correct row is always selected ok, but the view does not scroll so the selected row is visible.

Qt Code:
  1. proxy.setSourceModel(model);
  2. proxy.setFilterKeyColumn(1);
  3. proxy.setFilterFixedString(ui->mwCall->text());
  4. vidx = proxy.mapToSource(proxy.index(0,0));
  5. view->selectionModel()->select(vidx, QItemSelectionModel::Select | QItemSelectionModel::Rows);
  6. view->scrollTo(vidx, QAbstractItemView::EnsureVisible);
To copy to clipboard, switch view to plain text mode 

Any ideas as to how to fix this to make it scrollTo correctly?