Qt 6.11 is out! See what's new in the release
blog
Convert QByteArray to vector<uint8_t>
-
Hi,
I need help with convert
QByteArraytovector<uint8_t>.
Is there any simple way to do it ? -
Hi,
I need help with convert
QByteArraytovector<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_tshould be same type asunsigned char. -
Hi,
I need help with convert
QByteArraytovector<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_tshould be same type asunsigned char. -
D Damian7546 has marked this topic as solved on
-
@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_tshould be same type asunsigned char.