Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.2, 5.1.0 RC1
-
None
-
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.