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

Plain QWindow embedded by createWindowContainer does not regain focus after focussing widget

    XMLWordPrintable

    Details

      Description

      After setting focus to QWindow container and then changing focus to some other normal QWidget it is not possible to focus QWindow container again. This bug appeared in Qt 5.3, Qt 5.2.1 works fine.

      Steps to reproduce:
      1) Create main widget with two child widgets, one of them created using createWindowContainer. Set StrongFocus policy on both of them. Run this test program.
      2) Click on QWindow container - it receives focus
      3) Click on normal QWidget - it receives focus
      4) Click on QWindow container again - focus remains on normal QWidget

      Also I've found some interesting clues:
      1) if you alt-tab from application to another one and switch back you can focus QWindow container again, but again only once
      2) if you create two QWindow containers in application you can change focus between them without problem. Only changing focus from QWindow to QWidget and then back to the very same QWindow is broken

      I've attached minimal test case.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              cjstimpson Clinton Stimpson
              Reporter:
              skhoroshavin Sergey Khoroshavin
              Votes:
              11 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes