How to save editing item text of QTreeWidget by writing some code?
Hello everyone !
I got a problem on using QTreeWidget. As you know, when we double-click an item of QTreeWidget, an embeded edit box is displayed to allow us making some changes on item's text, and when we need saving our changes, we can just press 'Enter' or click some other position in widget. Well, this is really good, and simple enough. But when I edited the text of item and had not save it yet, I press a button which makes QTreeWidget to add a new item and open an embeded edit box for the new one, the old one will lost what I had edited. I wish I can avoid this content losing by adding some code in the slot of the button.
I had read the help documents of QTreeWidget, but I couldn't find some useful information. So, would you like help me or tell me how to solve it ?