Hi, I want to list all txt files of a directory to find one, but, the framework only list one file.
The comparaison also doens't work.

Here's my code :

Qt Code:
  1. //Je n'ai qu'un seul fichier!
  2. for (unsigned int i = 0; i < fileList.size(); i++) {
  3. QString text = qleRechercher->text();
  4. //std::cout<<text.toStdString()<<" "<<qleRechercher->text().toStdString();
  5. //widget2 n'a pas de layout, pourtant, il me dit qu'il en a un.
  6. QVBoxLayout* qvb = new QVBoxLayout(widget2);
  7. //Ne fonctionne pas.
  8. if (text == fileList.at(i)) {
  9. QCheckBox* qcb = new QCheckBox(text);
  10. qvb->addWidget(qcb);
  11. }
  12. }
To copy to clipboard, switch view to plain text mode 

Thanks.