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

Foreign QWidget in macOS doesn't get focus out event in some cases

XMLWordPrintable

    • macOS

      In the following scenario: a QTextEdit widget is placed in the view hierarchy of a "normal" NSWindow (so it acts like a foreign view from the AppKit perspective). 

      When focus is moved from the QTextEdit to any other non-Qt NSView in the same window, the text cursor in the editor continues to blink - although it of course doesn't get any key events. However if focus is moved to another Qt-based view in the same window, or an entirely different window altogether (in the same or different application) - the QTextEdit cursor stops drawing and appears inactive as expected.

      The more direct cause is that such Qt widgets in this scenario don't get a focusOutEvent delivered to them. It appears that the Cocoa integration relies on the next first responder handling notifying Qt about the focus change, and that doesn't work if it is not a Qt widget.

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

            vestbo Tor Arne Vestbø
            igkh Igor Khanin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes