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

Panel items require explicit setFocus() on child

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.0
    • 4.8.3, 5.0.0 Beta 2
    • Widgets: GraphicsView
    • None
    • Id7ec1741d0d5eb4ea845469909c8d684e14017f1

    Description

      A panel is any item that sets QGraphicsItem::ItemIsPanel. If you create an item that can take focus, or that has several child items, some of which can accept focus, you would expect one of these widgets to gain focus when the panel is activated. However with today's behavior you must explicitly have called setFocus() on the panel or one of its children for focus to automatically be given when the panel is activated. It's even not possible to hit Tab to get focus to appear on anything if setFocus() has not been explicitly called. This breaks the tab focus paradigm, where you should never have to set focus on any widget explicitly, it should be enough to define a reasonable focus chain.

      QGraphicsScene should be smart enough to set focus on the first reasonable widget when a panel is activated. The current behavior, where explicit setFocus() ensure a certain widget gains focus, must be kept.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          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