You are trying to create two MainWindows, both will run simultaneously, if you want the 2nd MainWindow to wait until first one is done then
Qt Code:
  1. #include <QtGui/QApplication>
  2. #include "mainwindow.h"
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. MainWindow w;
  8.  
  9. w.show();
  10. a.exec();//<<<<<<<<<<<<<<<<<<<<
  11.  
  12.  
  13. MainWindow dl;
  14. dl.setTarget("/mnt/jffs2/Synch.xml");
  15.  
  16. dl.download();
  17.  
  18. return 0;//<<<<<<<<<<<<<<<<<<<<
  19. }
To copy to clipboard, switch view to plain text mode 

also the error you mentioned (altually warnning) is because you commented out that solt in the code