You can use this simple code if you want to check it out
Qt Code:
#include <QtGui/QApplication> #include <QComboBox> #include <QStandardItemModel> int main(int argc, char *argv[]) { combo->setModel(model); combo->setEditable(true); combo->setMinimumWidth(100); combo->show(); return a.exec(); }To copy to clipboard, switch view to plain text mode
To reproduce:
1.) Start this simple App and select item3 for example by moving down arrow key.
2.) Select full text "item3" in the combo either by double click or with shift and arrow keys.
3.) Press Enter.
You will see that after pressing Enter combo box is moving to previous set index, which in this case will be "item1".
Can I avoid this behaviour?
Bookmarks