Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Edit QTreeView - keep text in edit box delegate
gde23 last edited by
i have an editable QTreeView with some data in it. Since typically i do not want to put something totally new in there, but edit the content i want the text to stay there and not get deleted when i enter the cursor.
How can i change this beahavior?
Fuel last edited by
You need a QAbstractItemDelegate. And in this Delegate the Method setModelData do that. http://doc.qt.io/qt-4.8/qabstractitemdelegate.html#setModelData