Results 1 to 1 of 1

Thread: QFtp get multiple files?

  1. #1
    Join Date
    Feb 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QFtp get multiple files?

    I tried to dowload multiple files using a loop.

    I downloaded 2 files, but the 1st one's size is about 3kb smaller than that in the ftp.
    Please help me solve it.Thank you.

    Sorry for my poor English.

    Qt Code:
    1. ftp2 = new QFtp;
    2. connect(ftp2, SIGNAL(done(bool)), this, SLOT(ftpDone2(bool)));
    3.  
    4. ftp2->connectToHost(url.host(), url.port(21));
    5. ftp2->login(url.userName(), url.password());
    6.  
    7. //loop start
    8. QString localFileName = QFileInfo(url.path()).fileName();
    9. file = new QFile(localFileName);
    10.  
    11. ftp2->get(url.path(), file);
    12. //loop end
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. void Update::ftpDone2(bool error)
    2. {
    3. file->close();
    4. //something else
    5. return;
    6. }
    To copy to clipboard, switch view to plain text mode 


    Added after 41 minutes:


    I knew how to solve it
    C++ Gui Proggramming with Qt4
    chap15 spider example
    Last edited by hexie; 12th March 2012 at 08:24.

Similar Threads

  1. Multiple UI files
    By Diblye in forum Newbie
    Replies: 5
    Last Post: 29th June 2012, 00:24
  2. Qt Multiple Ui files.....
    By Rajeshsan in forum Qt Programming
    Replies: 4
    Last Post: 19th January 2010, 04:14
  3. QFtp appending of files
    By DIMEDROLL in forum Qt Programming
    Replies: 8
    Last Post: 2nd March 2009, 15:15
  4. QFtp hidden files/folder's list
    By jay in forum Qt Programming
    Replies: 1
    Last Post: 26th December 2008, 12:12
  5. Replies: 0
    Last Post: 23rd September 2007, 11:54

Tags for this Thread

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.