Home · All Classes · All Functions · Overviews

QDeclarativeNetworkAccessManagerFactory Class Reference
[QtDeclarative module]

The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager More...

 #include <QDeclarativeNetworkAccessManagerFactory>

This class was introduced in Qt 4.7.


Public Functions

virtual ~QDeclarativeNetworkAccessManagerFactory ()
virtual QNetworkAccessManager * create ( QObject * parent ) = 0

Detailed Description

The QDeclarativeNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager

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.

If the created QNetworkAccessManager becomes invalid, due to a change in proxy settings, for example, call the invalidate() method. This will cause all QNetworkAccessManagers to be recreated.

Note: the create() method may be called by multiple threads, so ensure the implementation of this method is reentrant.


Member Function Documentation

QDeclarativeNetworkAccessManagerFactory::~QDeclarativeNetworkAccessManagerFactory ()   [virtual]

The destructor is empty.

QNetworkAccessManager * QDeclarativeNetworkAccessManagerFactory::create ( QObject * parent )   [pure virtual]

Implement this method to create a QNetworkAccessManager with parent. This allows proxies, caching and cookie support to be setup appropriately.

Note: this method may be called by multiple threads, so ensure the implementation of this method is reentrant.


Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.7.0