Referring to my older question I am storing data in two QListwidget and on selection changed i am changing data depending upon key, value pair How to Store Data in QMap & Qlist in QT ?

Now My requirement is when i select data from first list box and say edit a new form will open filling all the details related to listbox now my listbox data is in tetbox in new form now when i edit it and say Ok it should also reflect in the listbox . I tried it but it is adding new data to listbox , it is not editing it .

Any help is appreciated. Thanks.

link|flag

64% accept rate
There is answer in your question. That is adding instead of editing. So, clearly, you are adding a new item to the ListBox. Save the index of item that you wanna edit. Then, edit it. listWidget->item(editIndex)->setText("Text"); – Lwin Htoo Ko 1 hour ago

Know someone who can answer? Share a link to this question via email, twitter, or facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.