- Extending Qt Creator Manual
- TaskTree
- QNetworkReplyWrapper
- Extending Qt Creator Manual 19.0.2

# QNetworkReplyWrapper Class

A wrapper around QNetworkReply and QNetworkAccessManager. More...

Header: | `#include <qnetworkwrappertask.h>`

- List of all members, including inherited members

Note: All functions in this class are reentrant.

## Signals

void | done(QtTaskTree::DoneResult result)
void | downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
void | sslErrors(const QList<QSslError> &errors)
void | started()

## Detailed Description

QNetworkReplyWrapper is a convenient class combining QNetworkAccessManager and QNetworkReply.

The mandatory configuration is to call setNetworkAccessManager() and setRequest(). By default the QNetworkReplyWrapper is configured with QNetworkAccessManager::GetOperation. Use setOperation() to perform other operations. Use setData() when the configured operation is Put, Post or Custom. Use setVerb() when the configured operation is Custom.

The associated QNetworkReply may be accessed via reply() method. The QNetworkReply is created dynamically by the start() method and managed by QNetworkReplyWrapper. It is deleted just after emitting done() signal.

## Member Function Documentation

### `[signal]` void QNetworkReplyWrapper::done(QtTaskTree::DoneResult result)

This signal is emitted after the associated QNetworkReply finished. The passed result indicates whether it has finished with success or an error.

See also reply().

### `[signal]` void QNetworkReplyWrapper::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)

This signal re-emitted from the running QNetworkReply, passing bytesReceived and bytesTotal.

See also reply().

### `[signal]` void QNetworkReplyWrapper::sslErrors(const QList<QSslError> &errors)

This signal re-emitted from the running QNetworkReply, passing a list of ssl errors.

See also reply().

### `[signal]` void QNetworkReplyWrapper::started()

This signal is emitted after successful start of the managed QNetworkReply.

See also start().