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

WA_KeyboardFocusChange is not reset on focus change through mouse

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.8
    • None
    • All

      The WA_KeyboardFocusChange is propagated to QWidget::window() within QApplicationPrivate::setFocusWidget() which leads to the behavior that from now on all focus changes (even with the mouse) carry this attribute.

      The only way to reset this attribute is to hide the QWindow::window() (QWidgetPrivate::setVisible() resets the attribute in this case).

      Looking into the code this was always the case but imo it stayed onnoticed since no style did something with this until now. The WinUI3/windows11 style draws a focus rect on keyboard focus changes but not for focus changes through mouse events.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            chehrlic Christian Ehrlicher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes