Editable Combobox not saving edited text
-
I have a editable combobox which is showing suggestions on entering text.
But if I am editing the current text, its not being saved.
After I make changes, it goes to onAccepted method in Combobox, finds the currect index but does not save it.
When I click on some other page and come back the combobox is back to the previous selection.
Please help. -
ComboBox leaves it up to you to decide what happens when the input is accepted. See the example in the docs:
ComboBox { editable: true model: ListModel { id: model ListElement { text: "Banana" } ListElement { text: "Apple" } ListElement { text: "Coconut" } } onAccepted: { if (find(editText) === -1) model.append({text: editText}) } } -
After I change any value, my code goes to onAccepted method in ComboBox and does not hit the method I have written here.
Is there something which I am missing out? -
my code ... does not hit the method I have written here.
I don't know what method you are talking about and how is it connected to this. I'm afraid we need to see some code to be able to help further.