Thanks for the reply Anda.

Yes you are right to assume that the setfocus is there to trigger the change in value.

But I cannot really understand what I need to do to set the data in the model. Could you please provide me with some more information on what I should do?

I found model->setData() but I do not know what to put in the three fields that it needs. It wants an index, the value (which will be QDate::currentDate()) and an integer that is equal to Qt::EditRole.

Thanks for the help,

Pericles