Marcel: Many thanks for the suggestions but neither worked. I had tried scrollToItem(). I didn't mention it because scrollToBottom() showed the same behaviour - sorry.
I'm going to try to reproduce this with a simple example in a clean project. In the meantime, I'd be grateful for any other suggestions.
FWIW, there were a couple of errors in the code you posted. I'll correct them for anyone reading later. In line 2 of the first example ui is not a pointer and the operator to access fontList should be . rather than ->
QModelIndex index = ui.fontList->currentIndex();
ui.fontList->scrollTo(index, QAbstractItemView::EnsureVisible);
To copy to clipboard, switch view to plain text mode
In the second one QListWidget::item() returns a pointer to a QListWidgetItem
QListWidgetItem* item = ui.fontList->item(row);
ui.fontList->scrollToItem(item, QAbstractItemView::EnsureVisible);
To copy to clipboard, switch view to plain text mode
Bookmarks