I have 2 QDateEdit which are Date_dob and Date_doj.

I am storing the value using a Qstring shown below.

QString str_dob(ui->DATE_dob->text());
QString str_doj(ui->DATE_doj->text());

Now i want to populate the same into ui->Date_dob and ui->Date_doj (after some editing event takes place). I have used ,

ui->DATE_dob->setText(s.at(2));
ui->DATE_doj->setText(s.at(5)); //where s is a string having data

but the data doesnt polpulate.

Any kind of suggestion will be extremely appreicated.
Thanks in advance