Hi;
how to get a pointer of QVector<float> of char* type without programming.
Thanks.
Hi;
how to get a pointer of QVector<float> of char* type without programming.
Thanks.
Last edited by Naami; 23rd May 2010 at 13:08.
ie, I need convert "QVector <float>" to "QBaytArray" for compression this data, after saving in file.
You can just take the address of the first member, assuming QVectors work like C++ vectors:
char* c = &(myVector[0]);
This assumes, though, that QVector behaves in such a way that doing so makes sense. It may not. If it doesn't behave itself, you'll have to loop through the array and do something similar to the above with each element.
Naami (23rd May 2010)
Bookmarks