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

Gallery example: ComboBox won't add new items that are substrings of existing items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.2.1
    • 5.2.0 RC1
    • Quick: Controls 1
    • None
    • 49a7f0b8e544fed6bf7811198d7696af8d7baba9

      Edit the first item (Apple) and remove the e, then press enter. "Appl" should be added, but it's not.

      It seems currentText is not changed in onAccepted if it is a substring of the previously selected text.

      The workaround is simple. Simply change find(currentText) to find(editText) in the following example:

         if (editableCombo.find(currentText) === -1) {
               choices.append({text: editText})
               currentIndex = editableCombo.find(editText)
         }
      

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

            bachewii Jens
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes