In the below code i given a wrong ip address to connectToHost() function after that it don't show connection error please help me out.

Qt Code:
  1. #include <QFtp>
  2. #include <QCoreApplication>
  3. #include <stdio.h>
  4.  
  5. int main(int argc,char *argv[])
  6. {
  7. QCoreApplication app(argc,argv);
  8. QFtp *ftp = new QFtp();
  9. bool verify;
  10. verify = 0;
  11. printf("start ....\n");
  12. verify=ftp->connectToHost(QString("172.16.41"));
  13. if(!verify){printf("error in connecting\n");}else printf("connected \n");
  14. verify=ftp->login("daredevil","9232575381");
  15. if(!verify){printf("error in login\n");}else printf("login successfull \n");
  16. verify=ftp->cd("Music");
  17. if(!verify){printf("error in cd command\n");}else printf("cd successfull \n");
  18. verify = ftp->get("youtube_pRpeEdMmmQ0.flv");
  19. if(!verify){printf("error in get\n");}else printf("coppied \n");
  20. ftp->close();
  21. printf("successfully complete");
  22. app.exec();
  23. return 0;
  24. }
To copy to clipboard, switch view to plain text mode