Results 1 to 5 of 5

Thread: Finding Files

  1. #1
    Join Date
    Aug 2008
    Posts
    27
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Finding Files

    Hi,

    i am writing an Explorer-like program by which you can browse in the File system.

    I need to add a find function to my program.

    What is the fastest way to do this in Qt.
    I mean the fastest in running time not in coding time.

    i hope i don't have to traverse the folders recursively by myself.

    thanks...

  2. #2
    Join Date
    Dec 2007
    Posts
    627
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Finding Files


  3. #3
    Join Date
    Aug 2008
    Posts
    27
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Finding Files

    thanks ;

    but this example does not have recursive search like Explorer does.
    I need to search for a file name recursively?

    QDir::entryList() method does not work recursively which this example demonstrates.

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Finding Files

    why cant you use a recursive algorithm like we did in our school for finding out the factorial? ..
    just call the function again for each dir found in entrylist().

  5. #5
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Finding Files

    If your application is going to run only on unix/linux then i think you could just use shell's find.
    I'm a rebel in the S.D.G.

Similar Threads

  1. Replies: 12
    Last Post: 17th June 2009, 05:34
  2. How to display hidden files ?
    By merry in forum Qt Programming
    Replies: 1
    Last Post: 16th September 2008, 12:27
  3. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  4. Replies: 5
    Last Post: 22nd September 2006, 08:04
  5. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28

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.