Quote Originally Posted by hassinoss View Post
The is the same in the constructor , i just replace it

this is the code for the loop :

Qt Code:
  1. void Manager::run()
  2. {
  3. while(true)
  4. {
  5. m_url.setUrl("http://time.jsontest.com/");
  6. m_request.setUrl(m_url);
  7. connect(&m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(onResult(QNetworkReply*)));*/
  8. m_networkManager.get(m_request);
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 
And you disconnect where? Or do you want to multiply the number of slot invocation on each loop?
The network manager is still owned by the main thread (the thread that created it), so is the receiver object (this).
All processing other than the loop happens in the creating thread.

Are you sure that is what you want?

Quote Originally Posted by hassinoss View Post
i need the thread to send many requests and get many replies.
No, I mean, what do you need the thread for. Sending and receiving multiple requests does not need threads, so you must have some other reason do use one, no?

Cheers,
_