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

Two TextFields both have activeFocus

    XMLWordPrintable

Details

    • e7da97bf71108a0acd72629e383f884e2d756477

    Description

      Steps to reproduce:

      1. Type something in the second field.
      2. Click in the first field; both the first and the third fields will have activeFocus and will be blinking.

      import QtQuick 2.2
      import QtQuick.Controls 1.2
      import QtQuick.Layouts 1.1
      
      Rectangle {
          width: 400
          height: 400
      
          FocusScope {
              anchors.fill: parent
      
              TextField {
                  onEditingFinished: organizationEdit.focus = true
                  onActiveFocusChanged: {
                      print("name field active focus    =", activeFocus, ", focus = ", focus);
                      print("org field active focus     =", organizationEdit.activeFocus, ", focus = ", organizationEdit.focus);
                      print("address field active focus =", addressEdit.activeFocus, ", focus = ", addressEdit.focus);
                  }
                  y: 100
              }
              TextField {
                  id: organizationEdit
                  onEditingFinished: addressEdit.focus = true
                  y: 200
              }
              TextField {
                  id: addressEdit
                  y: 300
              }
          }
      }
      

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            mitch_curtis Mitch Curtis
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes