Convert QByteArray to uint8_t*(uint8_t array)
Unsolved
General and Desktop
-
How can I convert
QByteArray
coming fromQFile::readAll()
into auint8_t
array(uint8_t*
)? -
How can I convert
QByteArray
coming fromQFile::readAll()
into auint8_t
array(uint8_t*
)?@kayakaan02
https://doc.qt.io/qt-6/qbytearray.html#datajust the signdness doesn't match up, but you should be able to simply cast it, as it's the same size
-
How can I convert
QByteArray
coming fromQFile::readAll()
into auint8_t
array(uint8_t*
)?@kayakaan02
As @J-Hilk has said, but you might use const char *QByteArray::constData() const for efficiency/safety, assuming you really want aconst uint8_t*
, since I imagine you will not be altering the data.