diff options
Diffstat (limited to 'examples/widgets/tools/treemodelcompleter/mainwindow.cpp')
-rw-r--r-- | examples/widgets/tools/treemodelcompleter/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp index 4aabb04023..a8b51c7aa0 100644 --- a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp +++ b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp @@ -232,7 +232,7 @@ void MainWindow::highlight(const QModelIndex &index) return; QModelIndex sourceIndex = proxy->mapToSource(index); treeView->selectionModel()->select(sourceIndex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows); - treeView->scrollTo(index); + treeView->scrollTo(sourceIndex); } //! [6] |