Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to save editing item text of QTreeWidget by writing some code?
JohnYork last edited by
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 ?