Sorry for delay for reply i was on hollyday.

first the frees.txt file have 11 string items on the row seperated with tabs.
see example.
Koolstofstaal 350-850 EC 5 3 Ja Contour frezen 80-100 0.015-0.030 max. 2xD <2.5
Gereedschapstaal 800-1200 EC 8 3 Ja Gleuf frezen 80-100 0.015-0.030 max. 2xD <2.5
These file will be updated with 600 rows.

In my zoekDialog i have 5 comboboxes in each combobox different items.
When i choose items i want to show the items in Mainwindow lineedits.
example:
combobox 1 = Koolstofstaal
combobox 2 = EC
combobox 3 = 5
combobox 4 = 3
combobox 5 = Contour Frezen
The rest of the row in frees.txt must fill up in the other Mainwindow lineedits.

The problem is the iterator on stringlist show only 1 string item.
Normally i want to use in if 5 statements but the pick only 1 the first one
See example.
if ( mat == dlg.matComboBox->currentText() && frees == dlg.freesComboBox->currenText() && etc ... ) every statement must be true.

see MainWindow.cpp
Qt Code:
  1. void MainWindow::zoek()
  2. {
  3. zoekDialog dlg(this);
  4. if( dlg.exec() == QDialog::Accepted ) { // Open a Dialog with 5 Comboboxen filled with items.
  5.  
  6. QString treksterkte, koeling, voedingpertand, snijsnelheid, snedediepte, snedebreedte;
  7. QString mat = dlg.matComboBox->currentText(); //Choose a item in the combobox and put in the string mat.
  8. QString frees = dlg.freesComboBox->currentText();
  9. QString tand = dlg.tandComboBox->currentText();
  10. QString dia = dlg.diaComboBox->currentText();
  11. QString bewrk = dlg.bewerkComboBox->currentText();
  12.  
  13. QFile file("C:/Qt/Qt-prog/richtwaarden/frees.txt"); //Open the file with strings seperated with tabs.
  14. if( !file.open(QFile::ReadOnly))
  15. return;
  16.  
  17. QTextStream stream( &file);
  18. QString line;
  19. do {
  20.  
  21. line = stream.readLine();
  22. if(!line.isEmpty())
  23. {
  24. QStringList frees = line.split('\t', QString::SkipEmptyParts); // Make a Stringlist
  25. QListIterator<QString> i(frees); // Iterate over the Stringlist frees.
  26. while (i.hasNext())
  27. {
  28.  
  29. if ( mat == i.next()) // It search for that item in the Stringlist en put the item
  30. leMateriaal->setText( mat ); // in the Mainwindow Lineedit.
  31. if ( freestype == i.next())
  32. leFrees->setText( freestype ); // This don't work
  33. }
  34. }
  35. }while(!line.isEmpty());
  36.  
  37.  
  38. file.close();
  39. }
To copy to clipboard, switch view to plain text mode 

B.T.W. i did this with QtSql and QTSqlQuerry no problem works fine.
see little example of code:
Qt Code:
  1. void MainWindow::zoek()
  2. {
  3. zoekDialog dlg(this);
  4. if( dlg.exec() == QDialog::Accepted ) {
  5.  
  6. QString materiaal;
  7.  
  8. QSqlQuery query("SELECT * FROM frezen WHERE materiaal='" + dlg.matComboBox->currentText() + "'AND freesdiameter='" + dlg.diaComboBox->currentText() + "'AND freestype='" + dlg.freesComboBox->currentText() + "'AND aantaltanden='" + dlg.tandComboBox->currentText() + "'AND freesbewerking='" + dlg.bewerkComboBox->currentText() + "';");
  9. if (query.next())
  10. materiaal= query.value(0).toString();
  11. leMateriaal->setText(materiaal); QString treksterkte = query.value(1).toString();
  12. leTrek->setText(treksterkte);
  13. QString freestype = query.value(2).toString();
  14. leFrees->setText(freestype);
  15. QString freesdiameter = query.value(3).toString();
  16. leDiam->setText(freesdiameter);
  17. QString aantaltanden = query.value(4).toString();
  18. leAantal->setText(aantaltanden);
  19. QString koeling = query.value(5).toString();
  20. leKoeling->setText(koeling);
  21. QString freesbewerking = query.value(6).toString();
  22. leFreesb->setText(freesbewerking);
  23. QString snijsnelheid = query.value(7).toString();
  24. leSnijsnelheid->setText(snijsnelheid);
  25. QString voedingpertand = query.value(8).toString();
  26. leAanzet->setText(voedingpertand);
  27. QString snedediepte = query.value(9).toString();
  28. leSneded->setText(snedediepte);
  29. QString snedebreedte = query.value(10).toString();
  30. leSnedeb->setText(snedebreedte);
To copy to clipboard, switch view to plain text mode 
Maby i must stick with QTSql.

Thaks in advance.