hi, i have a program that connects with an ip-cam, on this kind of cam, i can order it to go to some predefinied positions, tanke pictures, or videos, but i have one problem combining all these.

thanks to qhttp and signals, i can send the order to move to one position, and when i recive the requestfinished, i send the order to take a picture, and when that one finishes make another move... and so on, i have a list of activities to do.
Qt Code:
  1. void TEjecutor::httpRequestFinished(int id, bool error)
  2. {
  3.  
  4. Sleep(1500);
  5. if (id==httpMove)
  6. {
  7. // QMessageBox msgBox;
  8. // msgBox.setText(QObject::tr("Move"));
  9. // msgBox.exec();
  10. Sleep(1500);
  11. this->takePicture();
  12. }
  13. else if (this->lista.seekFile(id))
  14. {
  15.  
  16. this->list.closeFile(id);
  17. // QMessageBox msgBox;
  18. // msgBox.setText(QObject::tr("Download %1").arg(id));
  19. // msgBox.exec();
  20. Sleep(1500);
  21. this->goToPosition();
  22. }
To copy to clipboard, switch view to plain text mode 

As you can see, when i recive the httpMove, means that the movement its made, so i take the picture, which creates a file and a connection, and goToPosition takes the next target from a list, and makes it

Qt Code:
  1. void TEjecutor::takePicture()
  2. {
  3. http->setHost(ip);
  4. http->setUser(user,pass);
  5. int id=http->get(order,file);
  6. this->list.add(file,id);
  7.  
  8. void TEjecutor:: goToPosition(QString ip, QString user, QString pass, QString destino)
  9. .
  10. .
  11. .
  12. http->setHost(ip);
  13. http->setUser(user,pass);
  14. httpMovimientos = http->get(QString("http://%1/axis-cgi/com/ptz.cgi?gotoserverpresetname=%2").arg(ip).arg(destino));
To copy to clipboard, switch view to plain text mode 

As you can see at httpRequestFinished i have some QBoxMessage, the fact is that if i run the application with those QBoxes, it'll work perfectly, but if i comment them, the files that i create will remain empty... but i have to make it work without them.
How is this possible? i tryed writing some sleep() functions on the same place as Qboxes were... but it didnt work!!!!


I'm on Windows and Qt 4.5.3