How to get length of QByteArray with binary data?
-
wrote on 5 Feb 2020, 11:58 last edited by
I have to following code:
QByteArray value = "2ad6a8da948de3ae0b73f5660574cc459fe8ad35"; m_value = QByteArray(QByteArray::fromHex(value)); m_length = m_value.
If value contains a '\0' it will show the wrong value.
What is the clean way to get the length of the binary data in QByteArray?
-
I have to following code:
QByteArray value = "2ad6a8da948de3ae0b73f5660574cc459fe8ad35"; m_value = QByteArray(QByteArray::fromHex(value)); m_length = m_value.
If value contains a '\0' it will show the wrong value.
What is the clean way to get the length of the binary data in QByteArray?
1/2