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

Editable ComboBox additional property to specify auto-completion case sensitivity

XMLWordPrintable

    • 6.2 Features

      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.

        For Gerrit Dashboard: QTBUG-79877
        # Subject Branch Project Status CR V

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

              Created:
              Updated:

                There are no open Gerrit changes