Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.3, 5.0.0 Beta 2
-
None
-
I1d0d81a90697eaf715a8a337c8bf6c2159329e68
Description
The internal tab focus chain managed by Qt for QGraphicsWidgets is broken if a widget in the middle of a chain sets the QGraphicsItem::ItemIsPanel flag. Panels are modal to keyboard events, and their focus chains are meant to be self-contained. They are as long as panels have this flag set on construction. But if the flag is set later for any reason, it becomes possible to tab yourself "out" of a panel. The panel remains active, so the effect is that it loses focus and alters the focusItem of the parent panel. A strongly related problem is that reparenting a panel item onto another also breaks the focus chain.
It's quite easy to see the cause of the problem; QGraphicsItem handles reparenting and toggling of focusability fine, but toggling of the ItemIsPanel flag is not handled. And in QGraphicsWidgetPrivate, reparenting restores the focus chain but does not handle panels in any way.
Attachments
Issue Links
- relates to
-
QTBUG-28194 Panel items require explicit setFocus() on child
- Closed