Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
nfc.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QtNfc/qndefrecord.h>
5#include <QtNfc/qndefnfctextrecord.h>
6
7#include <QtCore/QDebug>
8
10
12{
14
16 if (record.isRecordType<QNdefNfcTextRecord>()) {
17 QNdefNfcTextRecord textRecord(record);
18
19 qDebug() << textRecord.text();
20 }
22}
23
26{
27public:
29 QByteArray(sizeof(int), char(0)))
30
31 int foo() const;
32 void setFoo(int v);
33};
34
[Specialized class definition]
Definition nfc.cpp:26
void setFoo(int v)
Q_DECLARE_NDEF_RECORD(ExampleComF, QNdefRecord::ExternalRtd, "example.com:f", QByteArray(sizeof(int), char(0))) int foo() const
The QNdefNfcTextRecord class provides an NFC RTD-Text.
The QNdefRecord class provides an NFC NDEF record.
Definition qndefrecord.h:16
QT_USE_NAMESPACE void snippet_recordConversion()
Definition nfc.cpp:11
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define qDebug
[1]
Definition qlogging.h:164
#define Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(className, typeNameFormat_, type_)
Definition qndefrecord.h:72
GLsizei const GLfloat * v
[13]
GLfloat GLfloat f
MyRecord record(int row) const
[0]
QString foo
[0]