Hi again! I'm having problems when i put files in the server with QFTP, the file is upload with no problem but when i want to show the transfer progress the signal datatransferprogress send a wrong value in the qint done... the first value that this signal send is 0 and the totalsize of the file and the second send the totalsize and the totasize... in 1 second this signal think that has send all the data when it is not like this.

Qt Code:
  1. void principal::loadFtp()
  2. {
  3. ftp = new QFtp;
  4. ftp->connectToHost(dirHost);
  5. ftp->login(hostUser,hostPass);
  6. ftp->cd("public_html");
  7. ftp->list();
  8. ftp->setTransferMode(QFtp::Active);
  9.  
  10. connect(ftp,SIGNAL(dataTransferProgress(qint64,qint64)),this,SLOT(ftpProgress(qint64,qint64)));
  11. connect(ftp,SIGNAL(stateChanged(int)),this,SLOT(ftpStateChanged(int)));
  12. connect(ftp,SIGNAL(commandStarted(int)),this,SLOT(ftpStart(int)));
  13. connect(ftp,SIGNAL(commandFinished(int,bool)),this,SLOT(ftpFinish(int,bool)));
  14. connect(ftp,SIGNAL(listInfo(QUrlInfo)),this,SLOT(showList(QUrlInfo)));
  15. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void principal::ftpProgress(qint64 done,qint64 total)
  2. {
  3. ui->ftpBar->setMaximum(total);
  4. ui->ftpBar->setValue(done);
  5. }
To copy to clipboard, switch view to plain text mode