summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2018-07-20 06:52:31 +0200
committerPaul Wicking <paul.wicking@qt.io>2018-08-30 13:14:01 +0000
commit7f0cc35d9c33802742aaa640472f3d9d2390ffa4 (patch)
treec1fd499a08f83c18a605ff16dbe2617faecd23cc /examples
parent059b10f295d8d04c4144984daf1464115bcb69c9 (diff)
Examples: Fix minor bug in Tree Model Completer Example
Minor bug that caused highlighter to not work properly. Task-number: QTBUG-66084 Change-Id: I7860d7a13c402e3236f4c844020e35e11f6e53e5 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/tools/treemodelcompleter/mainwindow.cpp2
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]