View Full Version : Receiving reply from page

29th September 2011, 11:59
I looking for some method of reciving reply from page instead of EventLoop, like here:

bool Engine::connection(){
reply = manager->get(request);
connect(reply, SIGNAL(readyRead()), eventLoop, SLOT(quit()));
//read reply
return reply->error() ? false : true;
How can I read it in a different way without using new slot?
I also tried waitForReadyRead function, but it doeasn't work.

29th September 2011, 12:17
What's wrong with using an event loop?

29th September 2011, 12:24
It looks for me very strange when i use in every function loop to recive any data, and don't know why doesn't have function like waitForReadyRead().

29th September 2011, 12:31
You don't want slots, you don't want event loops... So why are you using Qt in the first place? You want waitForReadyRead() which does the same as waiting on an event loop. If you don't want to write the same code many times then just write a function that will do that for you. You can even call it "waitForReadyRead".