Since: 1.2

#include <QtConnectivity/QBluetoothTransferReply>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QBluetoothTransferReply

The QBluetoothTransferReply class contains the data and headers for a request sent with QBluetoothTranferManager.

In additional to a copy of the QBluetoothTransferRequest object used to create the request, QBluetoothTransferReply contains the contents of the reply itself.

QBluetoothTransferReply is a sequential-access QIODevice, which means that once data is read from the object, it no longer kept by the device. It is therefore the application's responsibility to keep this data if it needs to. Whenever more data is received and processed, the readyRead() signal is emitted.

The downloadProgress() signal is also emitted when data is received, but the number of bytes contained in it may not represent the actual bytes received, if any transformation is done to the contents (for example, decompressing and removing the protocol overhead).

Even though QBluetoothTransferReply is a QIODevice connected to the contents of the reply, it also emits the uploadProgress() signal, which indicates the progress of the upload for operations that have such content.


Protected Attributes Index

QBluetoothTransferReplyPrivate *d_ptr

Public Functions Index

~QBluetoothTransferReply ()
QVariantattribute (QBluetoothTransferRequest::Attribute code) const
TransferErrorerror () const =0
QStringerrorString () const =0
boolisFinished () const =0
boolisRunning () const =0
QBluetoothTransferManager *manager () const
QBluetoothTransferManager::Operationoperation () const

Protected Functions Index

QBluetoothTransferReply (QObject *parent=0)
voidsetAttribute (QBluetoothTransferRequest::Attribute code, const QVariant &value)
voidsetManager (QBluetoothTransferManager *manager)
voidsetOperation (QBluetoothTransferManager::Operation operation)

Public Slots Index

voidabort ()

Signals Index

voiddownloadProgress (qint64 bytesReceived, qint64 bytesTotal)
voidfinished (QBluetoothTransferReply *)
voiduploadProgress (qint64 bytesSent, qint64 bytesTotal)

Public Types


This enum describes the type of error that occurred.

NoError No error. UnknownError Unknown error, no better enum available FileNotFoundError Unable to open the file specified HostNotFoundError Unable to connect to the target host UserCanceledTransferError User terminated the transfer

NoError 0

Protected Attributes

QBluetoothTransferReplyPrivate * d_ptr ()

Public Functions

~QBluetoothTransferReply ()


QVariant attribute (

Returns the attribute associated with the code code.

If the attribute has not been set, it returns an invalid QVariant.

TransferError error ()

QString errorString ()

String describing the error.

Can be displayed to the user.

bool isFinished ()

Returns true if this reply has finished; otherwise returns false.

bool isRunning ()

Returns true if this reply is running; otherwise returns false.

QBluetoothTransferManager * manager ()

Returns the QBluetoothTransferManager that was used to create this QBluetoothTransferReply object.

QBluetoothTransferManager::Operation operation ()

Returns the type of operation that this reply is for.

Protected Functions

QBluetoothTransferReply (

Constructs a new QBluetoothTransferReply with parent parent.

void setAttribute (

Set the attribute associated with the code code to the value value.

void setManager (

Set the reply's manager to manager manager.

void setOperation (

Sets the operation of this QBluetoothTransferReply to operation.

Public Slots

void abort ()

Aborts this reply.


void downloadProgress (
  • qint64bytesReceived,
  • qint64bytesTotal )

This signal is emitted whenever data is received.

The bytesReceived parameter contains the total number of bytes received so far out of bytesTotal expected for the entire transfer.

void finished (

This signal is emitted when the transfer is complete for reply.

void uploadProgress (
  • qint64bytesSent,
  • qint64bytesTotal )

This signal is emitted whenever data is sent.

The bytesSent parameter contains the total number of bytes sent so far out of bytesTotal.

Last modified: 2015-03-26

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus