Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.2
-
None
Description
Hello,
Problem:
I am adding text to editable QComboBox with setCurrentText() and then selectAll(). When the user presses Enter, it should validate the input.
What is currently happening: it works for the first time but then it always goes back to the first index.
Test case:
I attach small test case (available on github https://github.com/p4lewandowski/QComboBox_bug):
- Click on "Add entry" button (focus is given back to QComboBox).
- Press Enter to validate string (it works).
- Click on "Add entry" again.
- Press Enter to validate
- Display text is changed back to first input.
- You can check in the console QComboBox::currentText() is changed too.
Use of selectAll() in my application is required to ease the next input.
Similar issue without setCurrentText(), fixed, can be found here: https://bugreports.qt.io/browse/QTBUG-41288?jql=text%20~%20%22qcombobox%20selectall%22