Hello, I want selects the contents of a ComboBox, and DateEdit TimeEdit
This did not work
it displays only the mat field

Qt Code:
  1. QSqlQuery qry;
  2. qry.prepare("select * from Etudiant");
  3. if(qry.exec()){
  4. while(qry.next()){
  5. ui->lineEdit_matE->setText(qry.value(0).toString());
  6. ui->comboBox_sexE->setCurrentIndex(qry.value(1).toInt());
  7. ui->dateEdit_dateA->setDate(qry.value(2).toDate());
  8. ui->timeEdit_heureA->setTime(qry.value(3).toTime());
  9. }
To copy to clipboard, switch view to plain text mode