You have to play a bit with event filters, so that for example when you focus out of the editor or when you press the enter key, the contents is saved into the model.