IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

NearField QML Type

Provides access to NDEF messages stored on NFC Forum tags.

This type was introduced in Qt 5.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

NearField QML Type

  • Import Statement: import QtNfc 5.12

  • Since: Qt 5.2

  • Group: NearField is part of nfc-qml

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.

For platforms using neard, filtering is currently not implemented. For more information on neard see QNearFieldManager.

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

        onMessageRecordsChanged: displayMessage()
    }

See Also

Property Documentation

 

[read-only] 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.

Filtering is not supported when using neard.

QNearFieldManager::registerNdefMessageHandler()

[read-only] 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. This is not supported when using neard.

The default of orderMatch is false.

[since 5.5] polling : bool

This property indicates if the underlying adapter is currently in polling state. If set to true the adapter will start polling and stop polling if set to false.

On platforms using neard, the adapter will stop polling as soon as a tag has been detected. For more information see QNearFieldManager.

This property was introduced in Qt 5.5.

Signal Documentation

 

[since 5.5] tagFound()

This signal will be emitted when a tag has been detected.

The corresponding handler is onTagFound.

This signal was introduced in Qt 5.5.

[since 5.5] tagRemoved()

This signal will be emitted when a tag has been removed.

The corresponding handler is onTagRemoved.

This signal was introduced in Qt 5.5.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+