You have to subclass QNetworkAccessManager and reimplement createRequest().
I'm already doing this but in a different way.

Qt Code:
  1. QNetworkReply *
  2. NetworkAccessManager::createRequest( Operation op, const QNetworkRequest & req, QIODevice * outgoingData)
  3. {
  4. QNetworkReply * reply = QNetworkAccessManager::createRequest(op, req, outgoingData);
  5.  
  6. if (checkIfAsync(req.url().toString()))
  7. {
  8. QObject::connect(reply, SIGNAL(finished()), this, SLOT(asyncFinishedHandler()));
  9. }
  10.  
  11. return reply;
  12. }
To copy to clipboard, switch view to plain text mode 

I would like to rewrite it in such a way I wouldn't have to connect individual replies with my slot anymore. I would like to handle the difference in reply's type in one place, in handler of this signal:
Qt Code:
  1. void QNetworkAccessManager::finished ( QNetworkReply * reply ) [signal]
To copy to clipboard, switch view to plain text mode 

Then you can return whatever you want.
Any customer can have a car painted any colour that he wants so long as it is black. -- Henry Ford

C++ supports only* covariant return types in overridden virtual functions. (* - my addition.)

Shortly speaking you can't return whatever you want
But the question was how to subclass QNetworkReply?

Having

Qt Code:
  1. class MyNetworkReply : public QNetworkReply
  2. {
  3. bool myFlag;
  4. };
To copy to clipboard, switch view to plain text mode 

how to reuse
Qt Code:
  1. QNetworkReply * QNetworkAccessManager::createRequest ( Operation op, const QNetworkRequest & req, QIODevice * outgoingData = 0 ) [virtual protected]
To copy to clipboard, switch view to plain text mode 
to set QNetworkReply part of MyNetworkReply object?