Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.4
-
None
Description
QAbstractItemView::keyPressEvent() only calls setSelection() if the selection flags contain Current, while QAbstractItemView::mousePressEvent() calls setSelection() regardless of the selection flags.
This leads to inconsistent behavior when calling setCurrentItem(<someItem>) in a slot connected to currentItemChanged(), for example. When navigating with the arrow keys, calling setCurrentItem() works as expected, while when clicking on an item with the mouse, this is overridden by the mousePressEvent()'s call to setSelection().