QBluetoothTransfer not sending File
Unsolved
General and Desktop
-
QBluetoothTransferManager *transferManager = new QBluetoothTransferManager(this); QBluetoothAddress remoteAddress("00:11:22:33:44:55:66"); QBluetoothTransferRequest request(remoteAddress); QFile *file = new QFile("testfile.txt"); QBluetoothTransferReply *reply = transferManager->put(request, file); if (reply->error() == QBluetoothTransferReply::NoError) { QObject::connect(reply, SIGNAL(finished(QBluetoothTransferReply*)), this, SLOT(transferFinished(QBluetoothTransferReply*))); QObject::connect(reply, SIGNAL(error(QBluetoothTransferReply::TransferError)), this, SLOT(error(QBluetoothTransferReply::TransferError))); } else { qWarning() << "Cannot push testfile.txt:" << reply->errorString(); }
I tried this, but could not send the file.
And moreover the reply->error() says thisException thrown: read access violation.
reply was nullptr.Please, help me out
How to transfer a File from Desktop to a Printer? -
Hi,
From the QBluetoothTransferManager::put documentation:
If the platform does not support the Object Push profile, this function will return 0.