Does QVariant expect a null-terminated QByteArray?
I need to construct a QVariant object from a QByteArray. Does the QVariant
constructor QVariant(const QByteArray & val) expect the raw bytes in the
QByteArray to be null-terminated?
Background info:
My QByteArray object was constructed with QByteArray::fromRawData(const
char * data, int size) and is not null-terminated.
My objective is to copy the raw bytes in my QByteArray object into a
database with QSqlQuery::bindValue() which expects a Qvariant object as
one of its arguments.
My guess is the the bytes in QByteArray must be null-terminated. I don't
see any other way how QVariant(const QByteArray & val) constructor could
be implemented.
Many thanks!
No comments:
Post a Comment