Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
4.4.0
-
None
Description
Consider a tree with the following items (* means hidden item):
- Anthony
- Beatrice
- Catherine*
- Camilla
- Dorothy
By pressing the sequence "B", "A", "C" the view should scroll from Beatrice to Anthony and then to Camilla.
Instead Camilla is not selected because QTreeView::keyboardSearch() internally calls d->model->match() to match the next item and
QAbstractItemModel::match() doesn't care if the current index is visible or hidden in the view and so it matches "Catherine" (first item that started with "C") and returns it.
QTreeView::keyboardSearch() then takes that matched index, but d->viewIndex() tells it that the matched index is not valid (because it's not visible).
And thus "Camilla" will never be selected, except if the user types "Cam" fast enough.