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

Keys.priority: Keys.AfterItem doesn't work for TextField

    XMLWordPrintable

Details

    Description

      import QtQuick 2.2
      import QtQuick.Controls 1.1
      
      Row {
          width: 100
          height: 50
          spacing: 10
      
          property alias control1: _control1
          TextField {
              id: _control1
              text: ""
              property bool gotit: false
              Keys.priority: Keys.AfterItem
              Keys.onPressed: {
                  if ((!gotit) && (event.key === Qt.Key_B)) {
                      gotit = true;
                      console.log("get it")
                      event.accepted = true;
                      return;
                  }
              }
          }
      }
      

      The issue was introduced by https://codereview.qt-project.org/76134

      The forwardTo doesn't care the Keys.priority here, always like BeforeItem.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            liaqi Liang Qi
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes