Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.0, 5.12.1, 5.12.2
-
None
Description
It seems that the `d->passiveFocusItem` is not updated by QGraphicsScene::setFocusItem() after the scene goes out of focus.
As a result, after gaining focus itself, it focused the last item that had focus when the scene had focus, instead of the last item set by setFocusItem() calls - even though the scene emits `focusItemChanged` after these calls.
This causes problems when trying to have a QGraphicsView and some other widget, showing a common list of items, to have the same item selected.
Example project attached. Try selecting some item in the graphicsView, then another one in the listWidget, then click somewhere to focus graphicsView again - it will reset the focused item back to the previously selected one.