PySide6.QtNfc.QNdefMessage¶
- class QNdefMessage¶
- The - QNdefMessageclass provides an NFC NDEF message. More…- Synopsis¶- Methods¶- def - __init__()
- def - append()
- def - at()
- def - back()
- def - capacity()
- def - clear()
- def - constData()
- def - constFirst()
- def - constLast()
- def - count()
- def - data()
- def - empty()
- def - first()
- def - front()
- def - insert()
- def - isEmpty()
- def - isSharedWith()
- def - last()
- def - length()
- def - max_size()
- def - mid()
- def - move()
- def - __add__()
- def - __iadd__()
- def - __lshift__()
- def - __eq__()
- def - operator[]()
- def - pop_back()
- def - pop_front()
- def - prepend()
- def - push_back()
- def - push_front()
- def - remove()
- def - removeAll()
- def - removeAt()
- def - removeFirst()
- def - removeLast()
- def - removeOne()
- def - reserve()
- def - resize()
- def - shrink_to_fit()
- def - size()
- def - sliced()
- def - squeeze()
- def - swap()
- def - swapItemsAt()
- def - takeAt()
- def - toByteArray()
- def - toList()
- def - toVector()
- def - value()
 - Static functions¶- def - fromByteArray()
- def - fromList()
- def - fromVector()
- def - maxSize()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- A - QNdefMessageis a collection of 0 or more QNdefRecords.- QNdefMessageinherits from QList<- QNdefRecord> and therefore the standard QList functions can be used to manipulate the NDEF records in the message.- NDEF messages can be parsed from a byte array conforming to the NFC Data Exchange Format technical specification by using the - fromByteArray()static function. Conversely QNdefMessages can be converted into a byte array with the- toByteArray()function.- __init__()¶
 - Constructs a new empty NDEF message. - __init__(records)
- Parameters:
- records – .list of QNdefRecord 
 
 - Constructs a new NDEF message that contains all of the records in - records.- __init__(message)
- Parameters:
- message – - QNdefMessage
 
 - Constructs a new NDEF message that is a copy of - message.- __init__(record)
- Parameters:
- record – - QNdefRecord
 
 - Constructs a new NDEF message containing a single record - record.- append(arg__1)¶
- Parameters:
- arg__1 – - QNdefRecord
 
 - append(l)
- Parameters:
- l – .list of QNdefRecord 
 
 - at(i)¶
- Parameters:
- i – int 
- Return type:
 
 - back()¶
- Return type:
 
 - capacity()¶
- Return type:
- int 
 
 - clear()¶
 - constData()¶
- Return type:
 
 - constFirst()¶
- Return type:
 
 - constLast()¶
- Return type:
 
 - count()¶
- Return type:
- int 
 
 - data()¶
- Return type:
 
 - empty()¶
- Return type:
- bool 
 
 - first()¶
- Return type:
 
 - first(n)
- Parameters:
- n – int 
- Return type:
- .list of QNdefRecord 
 
 - static fromByteArray(message)¶
- Parameters:
- message – - QByteArray
- Return type:
 
 - Returns an NDEF message parsed from the contents of - message.- The - messageparameter is interpreted as the raw message format defined in the NFC Data Exchange Format technical specification.- If a parse error occurs an empty NDEF message is returned. - static fromList(list)¶
- Parameters:
- list – .list of QNdefRecord 
- Return type:
- .list of QNdefRecord 
 
 - static fromVector(vector)¶
- Parameters:
- vector – .list of QNdefRecord 
- Return type:
- .list of QNdefRecord 
 
 - front()¶
- Return type:
 
 - insert(arg__1, arg__2)¶
- Parameters:
- arg__1 – int 
- arg__2 – - QNdefRecord
 
 
 - isEmpty()¶
- Return type:
- bool 
 
 - Parameters:
- other – .list of QNdefRecord 
- Return type:
- bool 
 
 - last()¶
- Return type:
 
 - last(n)
- Parameters:
- n – int 
- Return type:
- .list of QNdefRecord 
 
 - length()¶
- Return type:
- int 
 
 - static maxSize()¶
- Return type:
- int 
 
 - max_size()¶
- Return type:
- int 
 
 - mid(pos[, len=-1])¶
- Parameters:
- pos – int 
- len – int 
 
- Return type:
- .list of QNdefRecord 
 
 - move(from, to)¶
- Parameters:
- from – int 
- to – int 
 
 
 - __add__(l)¶
- Parameters:
- l – .list of QNdefRecord 
- Return type:
- .list of QNdefRecord 
 
 - __iadd__(l)¶
- Parameters:
- l – .list of QNdefRecord 
- Return type:
- .list of QNdefRecord 
 
 - __lshift__(l)¶
- Parameters:
- l – .list of QNdefRecord 
- Return type:
- .list of QNdefRecord 
 
 - __eq__(other)¶
- Parameters:
- other – - QNdefMessage
- Return type:
- bool 
 
 - Returns - trueif this NDEF message is equivalent to- other; otherwise returns- false.- An empty message (i.e. isEmpty() returns - true) is equivalent to a NDEF message containing a single record of type- Empty.- operator(i)¶
- Parameters:
- i – int 
- Return type:
 
 - pop_back()¶
 - pop_front()¶
 - prepend(arg__1)¶
- Parameters:
- arg__1 – - QNdefRecord
 
 - push_back(arg__1)¶
- Parameters:
- arg__1 – - QNdefRecord
 
 - push_front(arg__1)¶
- Parameters:
- arg__1 – - QNdefRecord
 
 - remove(i[, n=1])¶
- Parameters:
- i – int 
- n – int 
 
 
 - removeAll(arg__1)¶
- Parameters:
- arg__1 – - QNdefRecord
 
 - removeAt(i)¶
- Parameters:
- i – int 
 
 - removeFirst()¶
 - removeLast()¶
 - removeOne(arg__1)¶
- Parameters:
- arg__1 – - QNdefRecord
 
 - reserve(size)¶
- Parameters:
- size – int 
 
 - resize(size)¶
- Parameters:
- size – int 
 
 - resizeForOverwrite(size)¶
- Parameters:
- size – int 
 
 - shrink_to_fit()¶
 - size()¶
- Return type:
- int 
 
 - sliced(pos)¶
- Parameters:
- pos – int 
- Return type:
- .list of QNdefRecord 
 
 - sliced(pos, n)
- Parameters:
- pos – int 
- n – int 
 
- Return type:
- .list of QNdefRecord 
 
 - squeeze()¶
 - swap(other)¶
- Parameters:
- other – .list of QNdefRecord 
 
 - swapItemsAt(i, j)¶
- Parameters:
- i – int 
- j – int 
 
 
 - takeAt(i)¶
- Parameters:
- i – int 
- Return type:
 
 - toByteArray()¶
- Return type:
 
 - Returns the NDEF message as a byte array. - The return value of this function conforms to the format defined in the NFC Data Exchange Format technical specification. - toList()¶
- Return type:
- .list of QNdefRecord 
 
 - toVector()¶
- Return type:
- .list of QNdefRecord 
 
 - value(i)¶
- Parameters:
- i – int 
- Return type: