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

Add focus follows mouse option for widgets

    XMLWordPrintable

Details

    Description

      Some applications have multiple panes in one window, each of which may require keyboard focus at a given time. (E.g. A windows with two or more main textareas.) On linux, many window managers (kwin, i3, etc.) allow for a "focus follows mouse" policy for windows, which sets window/keyboard focus to whichever window is under the mouse. It would be more consistent to enable this policy for multi-pane applications.

      One way of doing this would be to add a new option to Qt:FocusPolicy (e.g. Qt::(Mouse/Hover)Focus) that delivers keyboard focus when the mouse enters the area over the target widget (tab would naturally switch further along the focus chain). Such events would fall under Qt::MouseFocusReason.

      This new option would not break existing systems, and, since focus-follows-mouse behavior is typically only present on Linux computers, need not apply to all platforms.

      (This request is inspired by https://bugs.kde.org/show_bug.cgi?id=64816.)

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            frsfnrrg Arbi Trary
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes