How to customize item editing with QTreeView / QStandardItemModel?

I want to be able to activate editing by single-clicking a current item (that is not selected).

I want the edit field to contain certain text that I will specify, regardless of which column I've clicked. Also, after editing is completed I should receive some sort of signal, and ideally editing should not result in the item actually being changed.

I don't think you can double-click when every click is supposed to initiate editing (and hence the second click is eaten by the editor). No matter if you try to implement the desired behavior yourself or not.

I would highly recommend choosing something different than the single click as the edit trigger. If you want to be able to use double clicks, you will have to wait after a single click until you are sure that no double click was delivered. Then you can open your editor - and that might make for a strange user experience.

Take a look at the sources (I don't have them available) or just try it out by inserting a "qDebug("%lli", event->timestamp());" into e.g. the mousePressEvent and then clicking a button twice within a rough estimate of e.g. two seconds. I think it's going to be microseconds, maybe milliseconds - should be easy to figure out.

EDIT: I didn't find any hints in the sources, so either figure it out as described or use your own timer.

I'm almost done with my editing questions. One last thing: I want to prevent the editor from committing changes if it was closed in any other way than with Enter button press. Right now, it seems, only Esc will cancel the commit, any other way to close the editor will result in the data being commited.

It shouldn't matter. Maybe take a look at the closeEditor()-function - but if you really want to know about specific button presses, you might have to subclass QLineEdit (or whatever comes close to what you need) and write an editor on your own.

Also: Read a bit in the documentation. As far as I know, the setModelData-function is always (!) called when data has to be committed (so pressing Esc wouldn't trigger it). In there the data is written to the model.