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

Keyboard grab does not work on popup windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • Some future release
    • 5.3.0
    • Quick: Controls 1
    • None
    • Windows 7, OSX

      When I run the manual test for popupwindow key events (Qt5.3.0\src\qtquickcontrols\tests\manual\popupwindowkeyevents.qml) on Windows, key events are not sent to the popup window. I looks as if setKeyboardGrabEnabled() does not have any effect.

      Ideally I would like to use the PopupWindow from QtQuick.Controls.Private. Do you plan to make it part of QtQuick.Controls directly? I need to show a custom qml scene in a context and drop down menu, and this class would be perfect. But no matter if I use this or a custom popup class, I always run into the problem that a popup window that does not draw the focus from its parent window does not get key events, even when calling setKeyboardGrabEnabled(true) on it.

      I wonder if this is related to this bug: QTBUG-39156.

      I attached the test from the qtquickcontrols folder I am referring to.

        1. popupwindowkeyevents.qml
          3 kB
          Carsten Henßinger
        2. qtbug40049_qtbase_diag.diff
          8 kB
          Friedemann Kleint
        3. qtbug40049_qtdeclarative_diag.diff
          0.6 kB
          Friedemann Kleint
        4. qtbug40049_linux_log.txt
          2 kB
          Friedemann Kleint
        5. qtbug40049_windows_log.txt
          3 kB
          Friedemann Kleint
        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
            che Carsten Henßinger
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes