The QNearFieldShareTarget class transfers data to remote device over NFC. More...
|qmake:||QT += nfc|
This class was introduced in Qt 5.3.
|bool||share(const QNdefMessage &message)|
|bool||share(const QList<QFileInfo> &files)|
The QNearFieldShareTarget class can be used for sharing NDEF message or files to a remote NFC enabled device supporting the same protocol.
See also QNearFieldShareManager.
Member Function Documentation
[signal] void QNearFieldShareTarget::error(QNearFieldShareManager::ShareError error)
This signal is emitted whenever an error occurs during transfer.
This signal is emitted whenever a data or file transfer has completed successfully.
Destroys the near field share target.
Cancel the data or file sharing in progress.
Returns true if data or file sharing is in progress, otherwise returns false.
bool QNearFieldShareTarget::share(const QNdefMessage &message)
Share the NDEF message via the share target. This method starts sharing asynchronously and returns immediately. The method returns true if the request is accepted, otherwise returns false. Sharing is completed when the shareFinished() signal is emitted.
Share the files via the share target. This method starts sharing asynchronously and returns immediately. The method returns true if the request is accepted, otherwise returns false. Sharing is completed when the shareFinished() signal is emitted.
QNearFieldShareManager::ShareError QNearFieldShareTarget::shareError() const
Returns the error code of the error that occurred.
QNearFieldShareManager::ShareModes QNearFieldShareTarget::shareModes() const
Returns the share mode supported by the share target.
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.