Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-28187

Broken tab focus chain after enabling QGraphicsItem::ItemIsPanel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.0
    • 4.8.3, 5.0.0 Beta 2
    • Widgets: GraphicsView
    • 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

          For Gerrit Dashboard: QTBUG-28187
          # Subject Branch Project Status CR V

          Activity

            People

              bibr Andreas Aardal Hanssen
              bibr Andreas Aardal Hanssen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes