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

Editable QComboBox with QCompleter using Popup Completion incorrectly matches items using string comparison

    XMLWordPrintable

Details

    • qtbase/stable: 737abb8a5e51d75c0f2f93d5f7b42b05400034a9

    Description

      When using a QComboBox with several items with the same text, selection using the completion popup will always select the first item. This is because items are matched using string comparison inside QComboBox instead of using the item index.

      In the attached example, select the text in the line edit and type "item". Select any one of the items with the same text. Note that irrespective of user choice, the combo box will always select the first one with the black icon.

      It is possible to work around this, as also shown in the example. Uncomment the signal/slot connection on line 15 in customcombobox.cpp.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            louai Louai Al-Khanji
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes