The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager for use by a Qt Declarative engine. More...
#include <QDeclarativeNetworkAccessManagerFactory>
This class was introduced in Qt 4.7.
virtual | ~QDeclarativeNetworkAccessManagerFactory () |
virtual QNetworkAccessManager * | create ( QObject * parent ) = 0 |
The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager for use by a Qt Declarative engine.
QNetworkAccessManager is used for all network access by QML. By implementing a factory it is possible to create custom QNetworkAccessManager with specialized caching, proxy and cookie support.
To implement a factory, subclass QDeclarativeNetworkAccessManagerFactory and implement the create() method.
To use a factory, assign it to the relevant QDeclarativeEngine using QDeclarativeEngine::setNetworkAccessManagerFactory().
Note: the create() method may be called by multiple threads, so ensure the implementation of this method is reentrant.
See also QDeclarativeEngine::setNetworkAccessManagerFactory() and NetworkAccessManagerFactory example.
The destructor is empty.
Implement this method to create a QNetworkAccessManager with parent. This allows proxies, caching and cookie support to be setup appropriately.
This method must return a new QNetworkAccessManager each time it is called. The parent of the QNetworkAccessManager must be the parent provided. The QNetworkAccessManager(s) created by this function will be destroyed automatically when their parent is destroyed.
Note: this method may be called by multiple threads, so ensure the implementation of this method is reentrant.