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

Controls focus handling is not consistent when using a mouse

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 5.5.0
    • Quick: Controls 1
    • None
    • MinGW 4.9.2
      Windows 7 x64, Windows 10 x64 or Arch Linux x64

    Description

      Controls like ComboBox and CheckBox can get keyboard focus when the user navigate the UI using tab. However when the user clicks such a control, it does not get the keyboard focus.

      The result is that the UI behavior is not standard and misleading.
      For instance if the user as entered some text in a TextInput and the click on a CheckBox, he/she can expect to toggle the CheckBox state by pressing the space bar. However the focus is left to the TextInput which will add the spaces to its content.

      Here is a code sample:

      import QtQuick 2.4
      import QtQuick.Controls 1.3
      
      ApplicationWindow {
          width: 640
          height: 480
          visible: true
      
          Column {
              CheckBox {
                  id: checkBox1
                  text: qsTr("Check Box")
              }
      
              TextEdit {
                  id: textEdit1
                  text: qsTr("Text Edit")
                  font.pixelSize: 12
              }
          }
      }
      

      To reproduce:

      1. Click on textEdit1 as you were going to enter text.
      2. Click on checkBox1 to change its state.
      3. Even after checkBox1 state has been toggled, the text cursor is still visible in textEdit1
      4. Press the space bar. A user would expect to toggle checkBox1, but the keyboard inputs are sent to textEdit1

      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
            bterrier Benjamin Terrier
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes