Convert QByteArray to vector<uint8_t>
-
Hi,
I need help with convert
QByteArray
tovector<uint8_t>
.
Is there any simple way to do it ? -
Hi,
I need help with convert
QByteArray
tovector<uint8_t>
.
Is there any simple way to do it ?@Damian7546
Does this work:std::vector<uint8_t> c(bytes.constData(), bytes.constData() + bytes.size());
uint8_t
should be same type asunsigned char
. -
Hi,
I need help with convert
QByteArray
tovector<uint8_t>
.
Is there any simple way to do it ? -
@Damian7546
Does this work:std::vector<uint8_t> c(bytes.constData(), bytes.constData() + bytes.size());
uint8_t
should be same type asunsigned char
. -
-
@JonB said in Convert QByteArray to vector<uint8_t>:
std::vector<uint8_t> c(bytes.constData(), bytes.constData() + bytes.size());
Good catch,
does not seem possible with QVector ? -
@Damian7546
Does this work:std::vector<uint8_t> c(bytes.constData(), bytes.constData() + bytes.size());
uint8_t
should be same type asunsigned char
.