Results 1 to 2 of 2

Thread: Problem with QDirIterator

  1. #1

    Default Problem with QDirIterator

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QDirIterator

    So what exactly is not working? I.e. what do you expect to see and what happens instead?

    Cheers,
    _

Similar Threads

  1. QDirIterator internals?
    By zaphod.b in forum Qt Programming
    Replies: 8
    Last Post: 6th December 2013, 10:42
  2. Issue using QDir/QDirIterator
    By prophetjohn in forum Newbie
    Replies: 4
    Last Post: 14th September 2011, 05:04
  3. Replies: 1
    Last Post: 12th September 2011, 07:18
  4. Iterating with QDirIterator seems slow
    By TheShow in forum Qt Programming
    Replies: 1
    Last Post: 6th January 2010, 16:55
  5. QDirIterator and windows drives
    By invictus in forum Qt Programming
    Replies: 0
    Last Post: 8th March 2009, 19:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.