Qt: save QPixmap to std :: vector <unsigned char> - or convert QByteArray to std :: vector <unsigned char>
I wanted to convert QPixmap to std :: vector. So far I am doing the following
QPixmap pixmap;
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);
pixmap.save(&buffer, "JPG");
However, I do not know how to convert QbyteArray
tostd::vector<unsigned char>
any suggestions?
+4