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

Editable ComboBox additional property to specify auto-completion case sensitivity

    XMLWordPrintable

Details

    • 6.2 Features

    Description

      When an editable ComboBox has the following model elements, the auto-completion will also match "banana", "bANANA" or any other variation. This causes a problem when you want to exactly match the strings.

      ComboBox {
          editable: true
          model: ListModel {
              id: model
              ListElement { text: "Banana" }
              ListElement { text: "Apple" }
              ListElement { text: "Coconut" }
          }
      }
      

      In qquickcombox.cpp:459 in the acceptInput() function the find message uses Qt::MatchFixedString which is case insensitive per documentation.
      The problem is that I do the handling completely in the custom ComboBox, but this acceptInput() function kicks in afterwards and sets the currentIndex again.

      The suggestion is to introduce a property to set the Qt::MatchFlags for the acceptInput() case.

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              henning Henning Gründl
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes