- There is editable QComboxBox. It handles all the functionality well except for the case when we edit/insert/delete character of a string in position other than end. e.g. "Hello" , if we delete 'e' cursor reaches at end.
- currently editTextChanged(string) signal handling is such that inside it setEditText(string) has been called which causes the cursor to reach at end.
- Have gone through some other stackoverflow forums where people have suggested to use -> saving initial cursor position , then call setEditText and then reset the cursor to saved position. This looks good but looks like workaround soln.
- Wanted to know whether there can be other way to i) call setEditText when focus has been lost.(QFocusEvent will not work since derived class is inherited from QObject not QWidget) or ii) call comboBox->lineEdit functionality to do setEditText. tried below but it doesn't work connect(qcomboBox->lineEdit(), SIGNAL(editingFinished()), this, SLOT(textChanged()));
Following are the links which I have gone through 1) editFinished for editable comboBox 2) saving cursor postion