Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 814a2b4c48f3ef6444b2ff5bf854d05a > files > 308

qtconnectivity5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qndefrecord.cpp -->
  <title>QNdefRecord Class | Qt NFC 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtnfc-index.html">Qt NFC</a></td><td ><a href="qtnfc-module.html">C++ Classes</a></td><td >QNdefRecord</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtnfc-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#macros">Macros</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#creating-specialized-ndef-record-classes">Creating Specialized NDEF Record Classes</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QNdefRecord Class</h1>
<!-- $$$QNdefRecord-brief -->
<p>The <a href="qndefrecord.html">QNdefRecord</a> class provides an NFC NDEF record. <a href="#details">More...</a></p>
<!-- @@@QNdefRecord -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QNdefRecord&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += nfc</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qndefnfcsmartposterrecord.html">QNdefNfcSmartPosterRecord</a>, <a href="qndefnfctextrecord.html">QNdefNfcTextRecord</a>, and <a href="qndefnfcurirecord.html">QNdefNfcUriRecord</a></p>
</td></tr></table></div><ul>
<li><a href="qndefrecord-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#TypeNameFormat-enum">TypeNameFormat</a></b> { Empty, NfcRtd, Mime, Uri, ExternalRtd, Unknown }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#QNdefRecord-1">QNdefRecord</a></b>(const QNdefRecord &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#dtor.QNdefRecord">~QNdefRecord</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#id">id</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#isEmpty">isEmpty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#isRecordType">isRecordType</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#payload">payload</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#setId">setId</a></b>(const QByteArray &amp;<i>id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#setPayload">setPayload</a></b>(const QByteArray &amp;<i>payload</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#setType">setType</a></b>(const QByteArray &amp;<i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#setTypeNameFormat">setTypeNameFormat</a></b>(QNdefRecord::TypeNameFormat <i>typeNameFormat</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#type">type</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNdefRecord::TypeNameFormat </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#typeNameFormat">typeNameFormat</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#operator-not-eq">operator!=</a></b>(const QNdefRecord &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QNdefRecord &amp;</td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#operator-eq">operator=</a></b>(const QNdefRecord &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#operator-eq-eq">operator==</a></b>(const QNdefRecord &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="macros"></a>
<h2 id="macros">Macros</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD">Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD</a></b>(<i>className</i>, <i>typeNameFormat</i>, <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qndefrecord.html#Q_DECLARE_NDEF_RECORD">Q_DECLARE_NDEF_RECORD</a></b>(<i>className</i>, <i>typeNameFormat</i>, <i>type</i>, <i>initialPayload</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QNdefRecord-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qndefrecord.html">QNdefRecord</a> class provides an NFC NDEF record.</p>
<p><a href="qndefrecord.html">QNdefRecord</a> and derived classes are used to parse the contents of <a href="qndefmessage.html">NDEF messages</a> and create new NDEF messages.</p>
<p>Use <a href="qndefrecord.html#typeNameFormat">typeNameFormat</a>() and <a href="qndefrecord.html#setTypeNameFormat">setTypeNameFormat</a>() to get and set the type name format of the NDEF record.</p>
<p>Use <a href="qndefrecord.html#type">type</a>() and <a href="qndefrecord.html#setType">setType</a>() to get and set the type of the NDEF record.</p>
<p>Use <a href="qndefrecord.html#id">id</a>() and <a href="qndefrecord.html#setId">setId</a>() to get and set the id of the NDEF record.</p>
<p>Use <a href="qndefrecord.html#payload">payload</a>() and <a href="qndefrecord.html#setPayload">setPayload</a>() to get and set the NDEF record payload. <a href="qndefrecord.html#isEmpty">isEmpty</a>() can be used to test if the payload is empty.</p>
<p><a href="qndefrecord.html">QNdefRecord</a> is an implicitly shared class. This means you can efficiently convert between <a href="qndefrecord.html">QNdefRecord</a> and specialized record classes. The <a href="qndefrecord.html#isRecordType">isRecordType</a>() template function can be used to test if a conversion is possible. The following example shows how to test if a <a href="qndefrecord.html">QNdefRecord</a> is an NFC RTD Text record and extract the text information from it.</p>
<pre class="cpp">

  <span class="keyword">if</span> (record<span class="operator">.</span>isRecordType<span class="operator">&lt;</span><span class="type"><a href="qndefnfctextrecord.html">QNdefNfcTextRecord</a></span><span class="operator">&gt;</span>()) {
      <span class="type"><a href="qndefnfctextrecord.html">QNdefNfcTextRecord</a></span> textRecord(record);

      qDebug() <span class="operator">&lt;</span><span class="operator">&lt;</span> textRecord<span class="operator">.</span>text();
  }

</pre>
<a name="creating-specialized-ndef-record-classes"></a>
<h3 id="creating-specialized-ndef-record-classes">Creating Specialized NDEF Record Classes</h3>
<p>Specialized NDEF record classes can be easily created with the <a href="qndefrecord.html#Q_DECLARE_NDEF_RECORD">Q_DECLARE_NDEF_RECORD</a>() and <a href="qndefrecord.html#Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD">Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD</a>() macros. The following example shows the class declaration of the hypothetical <i>example.com:f</i> record type that encapsulates a single int property foo.</p>
<pre class="cpp">

  <span class="keyword">class</span> ExampleComF : <span class="keyword">public</span> <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span>
  {
  <span class="keyword">public</span>:
      Q_DECLARE_NDEF_RECORD(ExampleComF<span class="operator">,</span> <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span><span class="operator">::</span>ExternalRtd<span class="operator">,</span> <span class="string">&quot;example.com:f&quot;</span><span class="operator">,</span>
                            <span class="type">QByteArray</span>(<span class="keyword">sizeof</span>(<span class="type">int</span>)<span class="operator">,</span> <span class="type">char</span>(<span class="number">0</span>)))

      <span class="type">int</span> foo() <span class="keyword">const</span>;
      <span class="type">void</span> setFoo(<span class="type">int</span> v);
  };

  Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(ExampleComF<span class="operator">,</span> <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span><span class="operator">::</span>ExternalRtd<span class="operator">,</span> <span class="string">&quot;example.com:f&quot;</span>)

</pre>
<p>The developer only needs to provide implementations for the <code>foo()</code> and <code>setFoo()</code> functions that parse and set the contents of the NDEF record's payload.</p>
</div>
<!-- @@@QNdefRecord -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$TypeNameFormat$$$Empty$$$NfcRtd$$$Mime$$$Uri$$$ExternalRtd$$$Unknown -->
<h3 class="fn" id="TypeNameFormat-enum"><a name="TypeNameFormat-enum"></a>enum QNdefRecord::<span class="name">TypeNameFormat</span></h3>
<p>This enum describes the type name format of an NDEF record.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QNdefRecord::Empty</code></td><td class="topAlign tblval"><code>0x00</code></td><td class="topAlign">An empty NDEF record, the record does not contain a payload</td></tr>
<tr><td class="topAlign"><code>QNdefRecord::NfcRtd</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">The NDEF record type is defined by an NFC RTD Specification</td></tr>
<tr><td class="topAlign"><code>QNdefRecord::Mime</code></td><td class="topAlign tblval"><code>0x02</code></td><td class="topAlign">The NDEF record type follows the construct described in RFC 2046</td></tr>
<tr><td class="topAlign"><code>QNdefRecord::Uri</code></td><td class="topAlign tblval"><code>0x03</code></td><td class="topAlign">The NDEF record type follows the construct described in RFC 3986</td></tr>
<tr><td class="topAlign"><code>QNdefRecord::ExternalRtd</code></td><td class="topAlign tblval"><code>0x04</code></td><td class="topAlign">The NDEF record type follows the construct for external type names described the NFC RTD Specification</td></tr>
<tr><td class="topAlign"><code>QNdefRecord::Unknown</code></td><td class="topAlign tblval"><code>0x05</code></td><td class="topAlign">The type of the record is unknown and should be treated similar to content with MIME type 'application/octet-stream' without further context</td></tr>
</table></div>
<!-- @@@TypeNameFormat -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QNdefRecord[overload1]$$$QNdefRecord -->
<h3 class="fn" id="QNdefRecord"><a name="QNdefRecord"></a>QNdefRecord::<span class="name">QNdefRecord</span>()</h3>
<p>Constructs a new empty NDEF record.</p>
<!-- @@@QNdefRecord -->
<!-- $$$QNdefRecord$$$QNdefRecordconstQNdefRecord& -->
<h3 class="fn" id="QNdefRecord-1"><a name="QNdefRecord-1"></a>QNdefRecord::<span class="name">QNdefRecord</span>(const <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span> &amp;<i>other</i>)</h3>
<p>Constructs a new NDEF record that is a copy of <i>other</i>.</p>
<!-- @@@QNdefRecord -->
<!-- $$$~QNdefRecord[overload1]$$$~QNdefRecord -->
<h3 class="fn" id="dtor.QNdefRecord"><a name="dtor.QNdefRecord"></a>QNdefRecord::<span class="name">~QNdefRecord</span>()</h3>
<p>Destroys the NDEF record.</p>
<!-- @@@~QNdefRecord -->
<!-- $$$id[overload1]$$$id -->
<h3 class="fn" id="id"><a name="id"></a><span class="type">QByteArray</span> QNdefRecord::<span class="name">id</span>() const</h3>
<p>Returns the id of the NDEF record.</p>
<p><b>See also </b><a href="qndefrecord.html#setId">setId</a>().</p>
<!-- @@@id -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QNdefRecord::<span class="name">isEmpty</span>() const</h3>
<p>Returns true if the NDEF record contains an empty payload; otherwise return false.</p>
<p>This is equivalent to calling <code>payload().isEmpty()</code>.</p>
<!-- @@@isEmpty -->
<!-- $$$isRecordType[overload1]$$$isRecordType -->
<h3 class="fn" id="isRecordType"><a name="isRecordType"></a><span class="type">bool</span> QNdefRecord::<span class="name">isRecordType</span>() const</h3>
<p>Returns true if the NDEF record is of the specified record type; otherwise returns false.</p>
<!-- @@@isRecordType -->
<!-- $$$payload[overload1]$$$payload -->
<h3 class="fn" id="payload"><a name="payload"></a><span class="type">QByteArray</span> QNdefRecord::<span class="name">payload</span>() const</h3>
<p>Returns the payload of the NDEF record.</p>
<p><b>See also </b><a href="qndefrecord.html#setPayload">setPayload</a>().</p>
<!-- @@@payload -->
<!-- $$$setId[overload1]$$$setIdconstQByteArray& -->
<h3 class="fn" id="setId"><a name="setId"></a><span class="type">void</span> QNdefRecord::<span class="name">setId</span>(const <span class="type">QByteArray</span> &amp;<i>id</i>)</h3>
<p>Sets the id of the NDEF record to <i>id</i>.</p>
<p><b>See also </b><a href="qndefrecord.html#id">id</a>().</p>
<!-- @@@setId -->
<!-- $$$setPayload[overload1]$$$setPayloadconstQByteArray& -->
<h3 class="fn" id="setPayload"><a name="setPayload"></a><span class="type">void</span> QNdefRecord::<span class="name">setPayload</span>(const <span class="type">QByteArray</span> &amp;<i>payload</i>)</h3>
<p>Sets the payload of the NDEF record to <i>payload</i>.</p>
<p><b>See also </b><a href="qndefrecord.html#payload">payload</a>().</p>
<!-- @@@setPayload -->
<!-- $$$setType[overload1]$$$setTypeconstQByteArray& -->
<h3 class="fn" id="setType"><a name="setType"></a><span class="type">void</span> QNdefRecord::<span class="name">setType</span>(const <span class="type">QByteArray</span> &amp;<i>type</i>)</h3>
<p>Sets the type of the NDEF record to <i>type</i>.</p>
<p><b>See also </b><a href="qndefrecord.html#type">type</a>().</p>
<!-- @@@setType -->
<!-- $$$setTypeNameFormat[overload1]$$$setTypeNameFormatQNdefRecord::TypeNameFormat -->
<h3 class="fn" id="setTypeNameFormat"><a name="setTypeNameFormat"></a><span class="type">void</span> QNdefRecord::<span class="name">setTypeNameFormat</span>(<span class="type"><a href="qndefrecord.html#TypeNameFormat-enum">QNdefRecord::TypeNameFormat</a></span> <i>typeNameFormat</i>)</h3>
<p>Sets the type name format of the NDEF record to <i>typeNameFormat</i>.</p>
<p><b>See also </b><a href="qndefrecord.html#typeNameFormat">typeNameFormat</a>().</p>
<!-- @@@setTypeNameFormat -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><span class="type">QByteArray</span> QNdefRecord::<span class="name">type</span>() const</h3>
<p>Returns the type of the NDEF record.</p>
<p><b>See also </b><a href="qndefrecord.html#setType">setType</a>().</p>
<!-- @@@type -->
<!-- $$$typeNameFormat[overload1]$$$typeNameFormat -->
<h3 class="fn" id="typeNameFormat"><a name="typeNameFormat"></a><span class="type"><a href="qndefrecord.html#TypeNameFormat-enum">QNdefRecord::TypeNameFormat</a></span> QNdefRecord::<span class="name">typeNameFormat</span>() const</h3>
<p>Returns the type name format of the NDEF record.</p>
<p><b>See also </b><a href="qndefrecord.html#setTypeNameFormat">setTypeNameFormat</a>().</p>
<!-- @@@typeNameFormat -->
<!-- $$$operator!=[overload1]$$$operator!=constQNdefRecord& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QNdefRecord::<span class="name">operator!=</span>(const <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span> &amp;<i>other</i>) const</h3>
<p>Returns true if this NDEF record does not equal <i>other</i>; otherwise return false.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQNdefRecord& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span> &amp;QNdefRecord::<span class="name">operator=</span>(const <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span> &amp;<i>other</i>)</h3>
<p>Assigns this NDEF record to <i>other</i>.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQNdefRecord& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QNdefRecord::<span class="name">operator==</span>(const <span class="type"><a href="qndefrecord.html#QNdefRecord">QNdefRecord</a></span> &amp;<i>other</i>) const</h3>
<p>Returns true if <i>other</i> and this NDEF record are the same.</p>
<!-- @@@operator== -->
</div>
<div class="macros">
<h2>Macro Documentation</h2>
<!-- $$$Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD[overload1]$$$Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD -->
<h3 class="fn" id="Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD"><a name="Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD"></a><span class="name">Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD</span>(<i>className</i>, <i>typeNameFormat</i>, <i>type</i>)</h3>
<p>This macro declares a template specialization for the <a href="qndefrecord.html#isRecordType">QNdefRecord::isRecordType</a>() function.</p>
<p>This macro should be used in the header file directly after the definition of a specialized NDEF record class.</p>
<p><i>className</i> is the name of the specialized class, <i>typeNameFormat</i> is the appropriate <a href="qndefrecord.html#TypeNameFormat-enum">QNdefRecord::TypeNameFormat</a> for the custom type and <i>type</i> is the type without the NID or NSS prefixes. That is <i>example.com:f</i> not <i>urn:nfc:ext:example.com:f</i>.</p>
<p>See the section on <a href="qndefrecord.html#creating-specialized-ndef-record-classes">Creating specialized NDEF record classes</a> for details.</p>
<p><b>See also </b><a href="qndefrecord.html#Q_DECLARE_NDEF_RECORD">Q_DECLARE_NDEF_RECORD</a>().</p>
<!-- @@@Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD -->
<!-- $$$Q_DECLARE_NDEF_RECORD[overload1]$$$Q_DECLARE_NDEF_RECORD -->
<h3 class="fn" id="Q_DECLARE_NDEF_RECORD"><a name="Q_DECLARE_NDEF_RECORD"></a><span class="name">Q_DECLARE_NDEF_RECORD</span>(<i>className</i>, <i>typeNameFormat</i>, <i>type</i>, <i>initialPayload</i>)</h3>
<p>This macro declares default and copy constructors for specialized NDEF record classes.</p>
<p><i>className</i> is the name of the specialized class, <i>typeNameFormat</i> is the appropriate <a href="qndefrecord.html#TypeNameFormat-enum">QNdefRecord::TypeNameFormat</a> for the custom type and <i>type</i> is the type without the NID or NSS prefixes. That is <i>example.com:f</i> not <i>urn:nfc:ext:example.com:f</i>. <i>initialPayload</i> is the initial payload of an empty record, it must be a QByteArray or a type that can be implicitly converted into a QByteArray.</p>
<p>See the section on <a href="qndefrecord.html#creating-specialized-ndef-record-classes">Creating specialized NDEF record classes</a> for details.</p>
<p><b>See also </b><a href="qndefrecord.html#Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD">Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD</a>().</p>
<!-- @@@Q_DECLARE_NDEF_RECORD -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    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. </p>
</div>
</body>
</html>