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
For Gerrit Dashboard: QTBUG-28187 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
40580,3 | Repair QGraphicsWidget focus chain when used with ItemIsPanel. | master | qt/qtbase | Status: ABANDONED | +2 | 0 |
41612,1 | Repair QGraphicsWidget focus chain when used with ItemIsPanel. | dev | qt/qtbase | Status: MERGED | +2 | 0 |
42994,1 | Repair QGraphicsWidget focus chain when used with ItemIsPanel. | stable | qt/qtbase | Status: ABANDONED | -1 | 0 |