0

I'm trying to implement simple webprofiler using QtWebKit (by extending Ghost.py). I need to measure when each HTTP request started and finished.

I can use finished signal from QNetworkAccessManager to get when request ended, but how do i know when request started? QNetworkAccessManager makes async requests and also uses queue, but there is no started signal. When is request actually started and how I can attach to this event?

jazgot
  • 1,943
  • 14
  • 25
  • Sounds like you're trying to make a solution fit the problem. – symcbean Jun 25 '12 at 09:32
  • What do you mean? QtWebkit uses QNetworkAccessManager to make requests, I can't see any possible way around it. – jazgot Jun 25 '12 at 11:14
  • QtWebKit has it's own debugging tool, where you can see each request and time it took to fullfill it. Check in sources how did they do this in QtWebKit – Kamil Klimek Jun 26 '12 at 09:35

1 Answers1

1

One possible resolution is to create subclass under QNetworkAccessManager and pass it to QWebPage. Inherited class should override method createRequest, which can measure start time of the HTTP request.

jazgot
  • 1,943
  • 14
  • 25