Hi!

I am new to Qt am making a QTreeView displaying a list of different objects. I want to be able to double click one of them and change it's name. Preferably, when the object is double clicked, the old name should be selected so the user can delete it by start write the new name and press enter.

I have looked around and can't really decide what to do... should I implement a class inheriting QItemDelegate? Or is this functionality already implemented?

I tried to use setModelData() but got the error:
"property("text") failed: property invalid or does no exist."

When reading the Model/View introduction on Trolltechs homepage I get the impression that there already are a lot of functionality implemented, but when I look at the documentation for the setEditorData() it says that it does nothing in the base implementation. So I'm a bit confused. I am a bit tired of finding out that the functionality already exist when I made a own implementation, so I thought that it would be a good idee to look around first but I can't find much about this.

Any tips or examples to share?


/pir