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>
This commit is contained in:
parent
059b10f295
commit
7f0cc35d9c
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user