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

Key events are forwarded to item's parent after each item from forwardTo list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.1.0
    • Fix Version/s: 5.4.0
    • Labels:
      None

      Description

      According to http://qt-project.org/doc/qt-4.8/qml-keys.html:

      If priority is Keys.BeforeItem (default) the order of key event processing is:
      1. Items specified in forwardTo
      2. specific key handlers, e.g. onReturnPressed
      3. onKeyPress, onKeyRelease handlers
      4. Item specific key handling, e.g. TextInput key handling
      5. parent item

      But it seem after forwarding event to item from forwardTo list parent item handles event. If it doesn't accept it event is forwarded to next item from forwardTo list and again to the parent.

      [Steps to reproduce]
      Try to run attached example and press any key.

      [Expected behavior]
      Keys.onPressed of item1
      Keys.onPressed of item2
      Keys.onPressed of item3
      Keys.onPressed of button
      Keys.onPressed of button's parent

      [Actual behavior]
      Keys.onPressed of item1
      Keys.onPressed of button's parent
      Keys.onPressed of item2
      Keys.onPressed of button's parent
      Keys.onPressed of item3
      Keys.onPressed of button's parent
      Keys.onPressed of button
      Keys.onPressed of button's parent

        Attachments

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

          Activity

            People

            Assignee:
            liaqi Liang Qi
            Reporter:
            blaszkie Leszek Błaszkiewicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes