For Qt4 webkit it should be possible to achieve this by using a custom QNetworkAccessManager.

Basically derive from that class, implement createRequest() such that you create a modified QNetworkRequest object and pass that to the base class implementation.

Cheers,
_