I tried using the scrollbar directly and that didn't work either. I added the following after selecting the found item:

Qt Code:
  1. QScrollBar* sb = ui.listWidget->verticalScrollBar();
  2. int min = sb->minimum();
  3. int max = sb->maximum();
  4. int range = max - min;
  5.  
  6. // Take the found row as a fraction of the count
  7. int r = row + 1;
  8. int c = ui.listWidget->count();
  9. int v = (100 * r) / c;
  10.  
  11. // Move to that fraction of the scrollbar range
  12. int p = (range * v) / 100;
  13. p += min;
  14. sb->setValue(p);
To copy to clipboard, switch view to plain text mode