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 :
//Je n'ai qu'un seul fichier!
for (unsigned int i = 0; i < fileList.size(); i++) {
QString text
= qleRechercher
->text
();
//std::cout<<text.toStdString()<<" "<<qleRechercher->text().toStdString();
//widget2 n'a pas de layout, pourtant, il me dit qu'il en a un.
//Ne fonctionne pas.
if (text == fileList.at(i)) {
qvb->addWidget(qcb);
}
}
//Je n'ai qu'un seul fichier!
for (unsigned int i = 0; i < fileList.size(); i++) {
QString text = qleRechercher->text();
//std::cout<<text.toStdString()<<" "<<qleRechercher->text().toStdString();
//widget2 n'a pas de layout, pourtant, il me dit qu'il en a un.
QVBoxLayout* qvb = new QVBoxLayout(widget2);
//Ne fonctionne pas.
if (text == fileList.at(i)) {
QCheckBox* qcb = new QCheckBox(text);
qvb->addWidget(qcb);
}
}
To copy to clipboard, switch view to plain text mode
Thanks.
Bookmarks