NearField QML Type

Provides access to NDEF messages stored on NFC Forum tags. More...

Import Statement: import QtNfc 5.2
Since: Qt 5.2

Properties

Detailed Description

The NearField type can be used to read NDEF messages from NFC Forum tags. Set the filter and orderMatch properties to match the required NDEF messages. Once an NDEF message is successfully read from a tag the messageRecords property is updated.

    NearField {
        filter: [ NdefFilter { type: "U"; typeNameFormat: NdefRecord.NfcRtd; minimum: 1; maximum: 1 } ]
        orderMatch: false

        onMessageRecordsChanged: displayMessage()
    }

See also NdefFilter, NdefRecord, QNearFieldManager, QNdefMessage, and QNdefRecord.

Property Documentation

filter : list<NdefFilter>

This property holds the NDEF filter constraints. The messageRecords property will only be set to NDEF messages which match the filter. If no filter is set, a message handler for all NDEF messages will be registered.

QNearFieldManager::registerNdefMessageHandler()


messageRecords : list<NdefRecord>

This property contains the list of NDEF records in the last NDEF message read.


orderMatch : bool

This property indicates whether the order of records should be taken into account when matching messages.


© 2015 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.