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

Mac: Focus issues when embedding into non-Qt apps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.4, 6.6.2, 6.7.0 Beta1, 6.8.0 FF
    • 5.4.2, 5.14.2, 6.3.1
    • QPA
    • None
    • macOS 10.15 - 14
    • macOS
    • cf9b143cb (dev), 565923306 (6.7), 28ac7a4e6 (6.6), 8c3a2f643 (tqtc/lts-6.5)

    Description

      We use Qt to embed controls into floating palettes of Adobe Illustrator. An Illustrator-provided palette is the parent of Qt widgets. There are multiple issues with transfering focus between Qt controls and Adobe controls:

      • Qt edit fields sometimes not get focus
      • Qt edit fields sometimes not lose focus, esp. when Adobe controls get the focus
      • Text caret sometimes not shown when typing in a Qt edit-field

      The root-cause is that the container widget was not activated after mouse clicking. The 'QCocoaWindow' should handle the window de/activation if it's embedded (i.e not a toplevel NSWindow).

      The proposed fix is in QCocoaWindow::windowDidBecomeKey() and QCocoaWindow::windowDidResignKey() - see the attached patch file for Qt 6.3.1. 6.3.2, 6.6.0

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            jan.patera Jan Patera
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: