Hello,
I want create a QlineEdit which shows values from SQL Server Database.
I try to do it in this way but no result (empty QlineEdit area) :
Qt Code:
  1. QString sQuery = QString("SELECT Matricule FROM Projet.dbo.Produit WHERE Nom='%1' ").arg(ui->comboBox->currentText());
  2.  
  3. QSqlQuery query;
  4. query.exec( sQuery );
  5.  
  6. QString name = query.value(0).toString();
  7.  
  8. ui->lineEdit_3->setText(name);
  9.  
  10. }
To copy to clipboard, switch view to plain text mode 
Any Suggestions ?? Thanks previsiouly